mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-09 18:33:14 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user