Skip to content

Commit b657772

Browse files
committed
fixed _DEFAULT_SCOPES for testing
1 parent 8b66536 commit b657772

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

oauth2_provider/tests/test_authorization_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def setUp(self):
4646
self.application.save()
4747

4848
oauth2_settings._SCOPES = ['read', 'write']
49+
oauth2_settings._DEFAULT_SCOPES = ['read', 'write']
4950

5051
def tearDown(self):
5152
self.application.delete()
@@ -1008,7 +1009,7 @@ def test_resource_access_deny(self):
10081009

10091010
class TestDefaultScopes(BaseTest):
10101011

1011-
def test_pre_auth_deafult_scopes(self):
1012+
def test_pre_auth_default_scopes(self):
10121013
"""
10131014
Test response for a valid client_id with response_type: code using default scopes
10141015
"""
@@ -1034,4 +1035,3 @@ def test_pre_auth_deafult_scopes(self):
10341035
self.assertEqual(form['state'].value(), "random_state_string")
10351036
self.assertEqual(form['scope'].value(), 'read')
10361037
self.assertEqual(form['client_id'].value(), self.application.client_id)
1037-
oauth2_settings._DEFAULT_SCOPES = []

oauth2_provider/tests/test_client_credential.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def setUp(self):
4848
self.application.save()
4949

5050
oauth2_settings._SCOPES = ['read', 'write']
51+
oauth2_settings._DEFAULT_SCOPES = ['read', 'write']
5152

5253
def tearDown(self):
5354
self.application.delete()

oauth2_provider/tests/test_password.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def setUp(self):
3737
self.application.save()
3838

3939
oauth2_settings._SCOPES = ['read', 'write']
40+
oauth2_settings._DEFAULT_SCOPES = ['read', 'write']
4041

4142
def tearDown(self):
4243
self.application.delete()

oauth2_provider/tests/test_scopes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class TestScopesQueryParameterBackwardsCompatibility(BaseTest):
6868
def setUp(self):
6969
super(TestScopesQueryParameterBackwardsCompatibility, self).setUp()
7070
oauth2_settings._SCOPES = ['read', 'write']
71+
oauth2_settings._DEFAULT_SCOPES = ['read', 'write']
7172

7273
def test_scopes_query_parameter_is_supported_on_post(self):
7374
"""

0 commit comments

Comments
 (0)