|
24 | 24 | get_subject_role_assignments_for_role_in_scope, |
25 | 25 | get_subject_role_assignments_in_scope, |
26 | 26 | unassign_role_from_subject_in_scope, |
27 | | - unassign_subjects_from_all_roles, |
| 27 | + unassign_subject_from_all_roles, |
28 | 28 | ) |
29 | 29 | from openedx_authz.engine.enforcer import AuthzEnforcer |
30 | 30 | from openedx_authz.engine.utils import migrate_policy_between_enforcers |
@@ -773,7 +773,7 @@ def test_get_all_role_assignments_in_scope(self, scope_name, expected_assignment |
773 | 773 | def test_unassign_subject_from_all_roles_removes_all_assignments( |
774 | 774 | self, subject_name, scopes, expected_roles_before |
775 | 775 | ): |
776 | | - """Test that unassign_subjects_from_all_roles removes all role assignments. |
| 776 | + """Test that unassign_subject_from_all_roles removes all role assignments. |
777 | 777 |
|
778 | 778 | Expected result: |
779 | 779 | - Before unassignment: Subject has roles in specified scopes |
@@ -801,7 +801,7 @@ def test_unassign_subject_from_all_roles_removes_all_assignments( |
801 | 801 | self.assertGreater(len(scope_assignments), 0) |
802 | 802 |
|
803 | 803 | # Unassign all roles from the subject |
804 | | - result = unassign_subjects_from_all_roles(subject) |
| 804 | + result = unassign_subject_from_all_roles(subject) |
805 | 805 |
|
806 | 806 | # Verify the function returns True (indicating roles were removed) |
807 | 807 | self.assertTrue(result) |
@@ -831,7 +831,7 @@ def test_unassign_subject_with_no_roles_returns_false(self): |
831 | 831 | self.assertEqual(len(assignments_before), 0) |
832 | 832 |
|
833 | 833 | # Unassign all roles (should return False since there are none) |
834 | | - result = unassign_subjects_from_all_roles(non_existent_subject) |
| 834 | + result = unassign_subject_from_all_roles(non_existent_subject) |
835 | 835 |
|
836 | 836 | # Verify the function returns False (no roles to remove) |
837 | 837 | self.assertFalse(result) |
@@ -864,7 +864,7 @@ def test_unassign_subject_does_not_affect_other_subjects(self): |
864 | 864 | self.assertGreater(len(heidi_assignments_before), 0) |
865 | 865 |
|
866 | 866 | # Unassign all roles from grace |
867 | | - result = unassign_subjects_from_all_roles(subject_to_unassign) |
| 867 | + result = unassign_subject_from_all_roles(subject_to_unassign) |
868 | 868 | self.assertTrue(result) |
869 | 869 |
|
870 | 870 | # Verify grace has no assignments after unassignment |
@@ -904,7 +904,7 @@ def test_unassign_and_reassign_subject(self): |
904 | 904 | self.assertGreater(len(assignments_before), 0) |
905 | 905 |
|
906 | 906 | # Unassign all roles |
907 | | - result = unassign_subjects_from_all_roles(subject) |
| 907 | + result = unassign_subject_from_all_roles(subject) |
908 | 908 | self.assertTrue(result) |
909 | 909 |
|
910 | 910 | # Verify no roles after unassignment |
|
0 commit comments