API - OAuth2 scopes tests refacto
This commit is contained in:
@ -11,7 +11,7 @@ from fittrackee.application.models import AppConfig
|
||||
from fittrackee.users.models import User
|
||||
|
||||
from ..mixins import ApiTestCaseMixin
|
||||
from ..utils import jsonify_dict
|
||||
from ..utils import OAUTH_SCOPES, jsonify_dict
|
||||
|
||||
|
||||
class TestGetConfig(ApiTestCaseMixin):
|
||||
@ -432,15 +432,7 @@ class TestUpdateConfig(ApiTestCaseMixin):
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'client_scope, can_access',
|
||||
[
|
||||
('application:write', True),
|
||||
('profile:read', False),
|
||||
('profile:write', False),
|
||||
('users:read', False),
|
||||
('users:write', False),
|
||||
('workouts:read', False),
|
||||
('workouts:write', False),
|
||||
],
|
||||
{**OAUTH_SCOPES, 'application:write': True}.items(),
|
||||
)
|
||||
def test_expected_scopes_are_defined(
|
||||
self,
|
||||
|
Reference in New Issue
Block a user