Refactor test cases and base code for consistency and readability

- Updated byte representations in tests to use lowercase hex format for consistency.
- Reformatted code for better readability, including line breaks and indentation adjustments.
- Consolidated multiple lines into single lines where appropriate to enhance clarity.
- Ensured that all test cases maintain consistent formatting and style across the test suite.
This commit is contained in:
Lloyd
2026-05-27 20:15:10 +01:00
parent faa3296a50
commit 45a44eb47b
83 changed files with 2790 additions and 2138 deletions
+3 -1
View File
@@ -20,7 +20,9 @@ def test_jwt_handler_create_and_verify_and_invalid_cases():
assert payload["sub"] == "admin"
assert payload["client_id"] == "client-1"
expired = jwt.encode({"sub": "admin", "client_id": "c", "iat": 1, "exp": 1}, secret, algorithm="HS256")
expired = jwt.encode(
{"sub": "admin", "client_id": "c", "iat": 1, "exp": 1}, secret, algorithm="HS256"
)
assert h.verify_jwt(expired) is None
assert h.verify_jwt("not-a-token") is None