$ MODE=static python -W ignore -m unittest -v test_credentials # 2026-11-29 Python 3.14.4 PyJWT 2.15.1 cryptography 50.0.2 test_1_permitted_call_works (test_credentials.T.test_1_permitted_call_works) ... ok test_2_action_outside_scope_is_denied (test_credentials.T.test_2_action_outside_scope_is_denied) ... FAIL test_3_token_for_one_service_is_refused_by_another (test_credentials.T.test_3_token_for_one_service_is_refused_by_another) ... FAIL test_4_broker_will_not_mint_write_scope (test_credentials.T.test_4_broker_will_not_mint_write_scope) ... FAIL test_5_lifetime_is_at_most_15_minutes (test_credentials.T.test_5_lifetime_is_at_most_15_minutes) ... FAIL test_6_expired_token_is_rejected (test_credentials.T.test_6_expired_token_is_rejected) ... FAIL test_7_each_run_gets_its_own_credential (test_credentials.T.test_7_each_run_gets_its_own_credential) ... FAIL ====================================================================== FAIL: test_2_action_outside_scope_is_denied (test_credentials.T.test_2_action_outside_scope_is_denied) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/scl/test_credentials.py", line 29, in test_2_action_outside_scope_is_denied self.assertEqual(code, 403, f"delete should be denied, got {code} {body}") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 200 != 403 : delete should be denied, got 200 {'deleted': '1'} ====================================================================== FAIL: test_3_token_for_one_service_is_refused_by_another (test_credentials.T.test_3_token_for_one_service_is_refused_by_another) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/scl/test_credentials.py", line 35, in test_3_token_for_one_service_is_refused_by_another self.assertEqual(code, 401, f"refund should be refused with 401, got {code} {body}") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 200 != 401 : refund should be refused with 401, got 200 {'refunded': 5000} ====================================================================== FAIL: test_4_broker_will_not_mint_write_scope (test_credentials.T.test_4_broker_will_not_mint_write_scope) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/scl/test_credentials.py", line 39, in test_4_broker_will_not_mint_write_scope if MODE == "static": self.fail("no broker in this mode: one credential holds every scope") ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: no broker in this mode: one credential holds every scope ====================================================================== FAIL: test_5_lifetime_is_at_most_15_minutes (test_credentials.T.test_5_lifetime_is_at_most_15_minutes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/scl/test_credentials.py", line 48, in test_5_lifetime_is_at_most_15_minutes self.assertLessEqual(c["exp"] - c["iat"], 900, f"lifetime {c['exp']-c['iat']} s") ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 31536000 not less than or equal to 900 : lifetime 31536000 s ====================================================================== FAIL: test_6_expired_token_is_rejected (test_credentials.T.test_6_expired_token_is_rejected) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/scl/test_credentials.py", line 55, in test_6_expired_token_is_rejected self.assertEqual(code, 401, f"expired token still accepted: {code}") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 200 != 401 : expired token still accepted: 200 ====================================================================== FAIL: test_7_each_run_gets_its_own_credential (test_credentials.T.test_7_each_run_gets_its_own_credential) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/scl/test_credentials.py", line 60, in test_7_each_run_gets_its_own_credential self.assertNotEqual(a["jti"], b["jti"]) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ AssertionError: 'static' == 'static' ---------------------------------------------------------------------- Ran 7 tests in 4.507s FAILED (failures=6)