This repository was archived by the owner on May 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from rest_framework import permissions , status
7
7
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
9
9
from rest_framework .compat import patterns
10
10
from rest_framework .test import APIRequestFactory , APIClient
11
11
from rest_framework .views import APIView
@@ -188,11 +188,15 @@ def test_post_passing_oauth2_with_jwt_auth_priority(self):
188
188
passes and does not require CSRF when JSONWebTokenAuthentication
189
189
has priority on authentication_classes
190
190
"""
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 (
192
195
user = self .user ,
193
196
client_type = 0 ,
194
197
)
195
- access_token = oauth2_provider_models .AccessToken .objects .create (
198
+
199
+ access_token = AccessToken .objects .create (
196
200
user = self .user ,
197
201
client = oauth2_client ,
198
202
)
You can’t perform that action at this time.
0 commit comments