Skip to content

Commit 7583ced

Browse files
committed
squash!: cleanup
1 parent d564d04 commit 7583ced

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

openedx_authz/api/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def get_subclass_by_external_key(mcs, external_key: str) -> Type["ScopeData"]:
252252
"""
253253

254254
# Special case: handle the global wildcard scope:
255-
if external_key == "*":
255+
if external_key == GLOBAL_SCOPE_WILDCARD:
256256
return mcs.glob_registry.get("global")
257257

258258
if EXTERNAL_KEY_SEPARATOR not in external_key:

openedx_authz/tests/api/test_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,11 @@ def test_scope_validate_external_key(self, external_key, expected_valid, expecte
366366
self.assertEqual(result, expected_valid)
367367

368368
@data(
369-
"undefined:DemoX",
370-
"undefined:DemoX:*",
369+
"unknown:DemoX",
370+
"unknown:DemoX:*",
371371
)
372-
def test_get_subclass_by_external_key_undefined_scope_raises_value_error(self, external_key):
373-
"""Undefined namespace should raise ValueError, including wildcard keys."""
372+
def test_get_subclass_by_external_key_unknown_scope_raises_value_error(self, external_key):
373+
"""Inknown namespace should raise ValueError, including wildcard keys."""
374374
with self.assertRaises(ValueError):
375375
ScopeMeta.get_subclass_by_external_key(external_key)
376376

openedx_authz/tests/api/test_roles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ class TestRoleAssignmentAPI(RolesTestSetupMixin):
922922
"""
923923

924924
@ddt_data(
925-
(["mary", "john"], roles.LIBRARY_USER.external_key, "*", True),
925+
(["mary", "john"], roles.LIBRARY_USER.external_key, "global:batch_test", True),
926926
(
927927
["paul", "diana", "lila"],
928928
roles.LIBRARY_CONTRIBUTOR.external_key,

0 commit comments

Comments
 (0)