MCPcopy
hub / github.com/pyca/cryptography / test_bad_key

Method test_bad_key

tests/test_fernet.py:147–149  ·  view source on GitHub ↗
(self, backend, key)

Source from the content-addressed store, hash-verified

145
146 @pytest.mark.parametrize("key", [base64.urlsafe_b64encode(b"abc"), b"abc"])
147 def test_bad_key(self, backend, key):
148 with pytest.raises(ValueError):
149 Fernet(key, backend=backend)
150
151 def test_extract_timestamp(self, backend):
152 f = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend)

Callers

nothing calls this directly

Calls 1

FernetClass · 0.90

Tested by

no test coverage detected