Skip to content

Commit d3adc7c

Browse files
committed
test: format code and uncomment tests
1 parent e561569 commit d3adc7c

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

openedx_authz/tests/rest_api/test_views.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ class ViewTestMixin(BaseRolesTestCase):
3939
"""Mixin providing common test utilities for view tests."""
4040

4141
@classmethod
42-
def _assign_roles_to_users(
43-
cls,
44-
assignments: list[dict] | None = None,
45-
):
42+
def _assign_roles_to_users(cls, assignments: list[dict] | None = None):
4643
"""Helper method to assign roles to multiple users.
4744
4845
This method can be used to assign a role to a single user or multiple users
@@ -115,7 +112,7 @@ def setUpClass(cls):
115112
},
116113
{
117114
"subject_name": "regular_7",
118-
"role_name": "library_collaborator",
115+
"role_name": "library_contributor",
119116
"scope_name": "lib:Org3:LIB3",
120117
},
121118
{
@@ -168,9 +165,9 @@ def setUp(self):
168165
([{"action": permissions.VIEW_LIBRARY.identifier, "scope": "lib:Org1:LIB1"}], [True]),
169166
# Single permission - denied (scope not assigned to user)
170167
([{"action": permissions.VIEW_LIBRARY.identifier, "scope": "lib:Org2:LIB2"}], [False]),
171-
# # Single permission - denied (action not assigned to user)
168+
# Single permission - denied (action not assigned to user)
172169
([{"action": "edit_library", "scope": "lib:Org1:LIB1"}], [False]),
173-
# # Multiple permissions - mixed results
170+
# Multiple permissions - mixed results
174171
(
175172
[
176173
{"action": permissions.VIEW_LIBRARY.identifier, "scope": "lib:Org1:LIB1"},
@@ -793,9 +790,9 @@ def test_get_roles_pagination(self, query_params: dict, expected_count: int, has
793790
# Library Admin user
794791
("regular_5", status.HTTP_200_OK),
795792
# Library Author user
796-
# ("regular_6", status.HTTP_200_OK), # TODO: uncomment this when we have the explicit permissions
797-
# Library Collaborator user
798-
# ("regular_7", status.HTTP_200_OK), # TODO: uncomment this when we have the explicit permissions
793+
("regular_6", status.HTTP_200_OK), # TODO: uncomment this when we have the explicit permissions
794+
# Library Contributor user
795+
("regular_7", status.HTTP_200_OK), # TODO: uncomment this when we have the explicit permissions
799796
# Library User user
800797
("regular_8", status.HTTP_200_OK),
801798
# Regular user without permission

0 commit comments

Comments
 (0)