|
7 | 7 | assign_role_to_user_in_scope, |
8 | 8 | batch_assign_role_to_users_in_scope, |
9 | 9 | batch_unassign_role_from_users, |
10 | | - get_all_user_role_assignments, |
11 | 10 | get_all_user_role_assignments_in_scope, |
12 | 11 | get_user_role_assignments, |
13 | 12 | get_user_role_assignments_for_role_in_scope, |
@@ -291,43 +290,6 @@ def test_unassign_all_roles_from_user_removes_all_assignments(self, username, sc |
291 | 290 | ) |
292 | 291 | self.assertEqual(len(scope_assignments), 0) |
293 | 292 |
|
294 | | - def test_get_all_user_role_assignments(self): |
295 | | - """Test retrieving all role assignments across all users and scopes. |
296 | | -
|
297 | | - Expected result: |
298 | | - - Returns all role assignments present in the system. |
299 | | - - Each assignment includes subject, role, and scope. |
300 | | - - Known assignments from the test setup are present in the result. |
301 | | - """ |
302 | | - role_assignments = get_all_user_role_assignments() |
303 | | - |
304 | | - self.assertGreater(len(role_assignments), 0) |
305 | | - |
306 | | - # Verify each assignment has the expected structure |
307 | | - for assignment in role_assignments: |
308 | | - self.assertIsNotNone(assignment.subject) |
309 | | - self.assertIsNotNone(assignment.scope) |
310 | | - self.assertGreater(len(assignment.roles), 0) |
311 | | - for role in assignment.roles: |
312 | | - self.assertIsNotNone(role.external_key) |
313 | | - |
314 | | - # Verify known assignments from setup are present |
315 | | - user_scope_role_triples = { |
316 | | - (a.subject.username, a.scope.external_key, a.roles[0].external_key) for a in role_assignments |
317 | | - } |
318 | | - self.assertIn( |
319 | | - ("alice", "lib:Org1:math_101", roles.LIBRARY_ADMIN.external_key), |
320 | | - user_scope_role_triples, |
321 | | - ) |
322 | | - self.assertIn( |
323 | | - ("eve", "lib:Org2:physics_401", roles.LIBRARY_ADMIN.external_key), |
324 | | - user_scope_role_triples, |
325 | | - ) |
326 | | - self.assertIn( |
327 | | - ("liam", "lib:Org4:art_101", roles.LIBRARY_AUTHOR.external_key), |
328 | | - user_scope_role_triples, |
329 | | - ) |
330 | | - |
331 | 293 | def test_unassign_all_roles_from_user_with_no_roles_returns_false(self): |
332 | 294 | """Test that unassigning a user with no roles returns False. |
333 | 295 |
|
|
0 commit comments