Skip to content

Commit 7805698

Browse files
refactor: add test case for non-existent lib scope
1 parent c4d7156 commit 7805698

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

openedx_authz/tests/test_enforcement.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,13 @@ def setUp(self) -> None:
637637
make_library_key("lib:TestOrg:TestLib"),
638638
False,
639639
),
640+
# Non existent library scope access denied
641+
(
642+
make_user_key("regular_user"),
643+
make_action_key("view_library"),
644+
make_library_key("lib:NonExistent:NoLib"),
645+
False,
646+
),
640647
)
641648
@unpack
642649
def test_staff_superuser_guaranteed_permissions(self, subject: str, action: str, scope: str, expected_result: bool):

0 commit comments

Comments
 (0)