Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit c37c9ff

Browse files
committed
Fix failing compat import
1 parent 69f363d commit c37c9ff

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rest_framework_jwt/tests/test_authentication.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from rest_framework import permissions, status
77
from rest_framework.authentication import OAuth2Authentication
8-
from rest_framework.compat import oauth2_provider, oauth2_provider_models
8+
from rest_framework.compat import oauth2_provider
99
from rest_framework.compat import patterns
1010
from rest_framework.test import APIRequestFactory, APIClient
1111
from rest_framework.views import APIView
@@ -188,11 +188,15 @@ def test_post_passing_oauth2_with_jwt_auth_priority(self):
188188
passes and does not require CSRF when JSONWebTokenAuthentication
189189
has priority on authentication_classes
190190
"""
191-
oauth2_client = oauth2_provider_models.Client.objects.create(
191+
Client = oauth2_provider.oauth2.models.Client
192+
AccessToken = oauth2_provider.oauth2.models.AccessToken
193+
194+
oauth2_client = Client.objects.create(
192195
user=self.user,
193196
client_type=0,
194197
)
195-
access_token = oauth2_provider_models.AccessToken.objects.create(
198+
199+
access_token = AccessToken.objects.create(
196200
user=self.user,
197201
client=oauth2_client,
198202
)

0 commit comments

Comments
 (0)