Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

style(tests): ruff-format the role normalization tests

polaris-smartb9b41dd529ad
diff --git a/tests/multi_user/test_role_normalization.py b/tests/multi_user/test_role_normalization.py
index 6ebb66d94..fd68f197f 100644
--- a/tests/multi_user/test_role_normalization.py
+++ b/tests/multi_user/test_role_normalization.py
@@ -30,9 +30,7 @@ def test_normalize_role_passes_legal_roles_through(legal):
assert normalize_role(legal) == legal
- "bogus", ["", "superadmin", "Admin", "instructor", "parent", "root"]
-)
[email protected]("bogus", ["", "superadmin", "Admin", "instructor", "parent", "root"])
def test_normalize_role_degrades_unknown_values_to_user(bogus):
assert normalize_role(bogus) == "user"
@@ -119,9 +117,7 @@ def test_token_payload_degrades_unknown_roles_to_user():
def test_new_roles_do_not_elevate(role):
# Only "admin" elevates: the new roles carry strictly user-level
# capabilities until a deployment explicitly grants more.
- current = user_from_token_payload(
- SimpleNamespace(user_id="u_n", username="n", role=role)
- )
+ current = user_from_token_payload(SimpleNamespace(user_id="u_n", username="n", role=role))
assert current.role == role
assert current.is_admin is False