MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_expired

Method test_expired

python/python3/tornado/test/web_test.py:2610–2621  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2608 self.assertIs(decoded2, None)
2609
2610 def test_expired(self):
2611 signed = create_signed_value(
2612 SignedValueTest.SECRET, "key1", "value", clock=self.past
2613 )
2614 decoded_past = decode_signed_value(
2615 SignedValueTest.SECRET, "key1", signed, clock=self.past
2616 )
2617 self.assertEqual(decoded_past, b"value")
2618 decoded_present = decode_signed_value(
2619 SignedValueTest.SECRET, "key1", signed, clock=self.present
2620 )
2621 self.assertIs(decoded_present, None)
2622
2623 def test_payload_tampering(self):
2624 # These cookies are variants of the one in test_known_values.

Callers

nothing calls this directly

Calls 2

create_signed_valueFunction · 0.90
decode_signed_valueFunction · 0.90

Tested by

no test coverage detected