Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Merge 385dda3 into d8cec20
Browse files Browse the repository at this point in the history
  • Loading branch information
chessbr committed Mar 8, 2018
2 parents d8cec20 + 385dda3 commit 7a6787c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django>=1.10,<1.12
djangorestframework>=3.6,<4.0
django>=2.0.2,<2.0.3
djangorestframework>=3.7.7,<4.0
djangorestframework-jwt>=1.11,<2
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
# pip-compile --output-file requirements.txt requirements.in
#
django==1.11.5
django==2.0.2
djangorestframework-jwt==1.11.0
djangorestframework==3.6.4
djangorestframework==3.7.7
pyjwt==1.5.3 # via djangorestframework-jwt
pytz==2017.2 # via django
pytz==2018.3 # via django
4 changes: 2 additions & 2 deletions rest_jwt_permission/providers/api_endpoint.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.utils.lru_cache import lru_cache
from rest_framework.schemas import EndpointInspector
from rest_framework.schemas.generators import EndpointEnumerator

from rest_jwt_permission.utils import get_role_for, get_view_role

Expand All @@ -12,7 +12,7 @@ class APIEndpointScopeProvider(ScopeProviderBase):
def get_available_scopes(self):
from rest_jwt_permission.scopes import APIScope

epi = EndpointInspector()
epi = EndpointEnumerator()
scopes = []

for (path, method, callback) in epi.get_api_endpoints():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_api_endpoint_scope_permission_provider():
):
scopes = get_all_permission_providers_scopes()
expected_identifiers = [
'apirootview:get',
'function_endpoint:get',
'function_endpoint:post',
'simplemodelviewset:list:get',
Expand Down
2 changes: 1 addition & 1 deletion rest_jwt_permission_tests/test_handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import jwt
from django.utils.text import force_text
from django.utils.encoding import force_text

from rest_jwt_permission.handlers import get_jwt_payload_from_request, get_payload_from_scopes, get_scopes_from_payload
from rest_jwt_permission.scopes import SimpleScope
Expand Down
2 changes: 1 addition & 1 deletion rest_jwt_permission_tests/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf.urls import include, url
from django.contrib.auth import get_user_model
from django.test.utils import override_settings
from django.utils.text import force_text
from django.utils.encoding import force_text
from rest_framework import response, routers, serializers, status, views, viewsets
from rest_framework.decorators import api_view, detail_route, list_route, permission_classes
from rest_framework.test import APIClient
Expand Down

0 comments on commit 7a6787c

Please sign in to comment.