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

Method test_add_response_twice

tests/x509/test_ocsp.py:364–388  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

362
363class TestOCSPResponseBuilder:
364 def test_add_response_twice(self):
365 cert, issuer = _cert_and_issuer()
366 time = datetime.datetime.now()
367 builder = ocsp.OCSPResponseBuilder()
368 builder = builder.add_response(
369 cert,
370 issuer,
371 hashes.SHA256(),
372 ocsp.OCSPCertStatus.GOOD,
373 time,
374 time,
375 None,
376 None,
377 )
378 with pytest.raises(ValueError):
379 builder.add_response(
380 cert,
381 issuer,
382 hashes.SHA256(),
383 ocsp.OCSPCertStatus.GOOD,
384 time,
385 time,
386 None,
387 None,
388 )
389
390 def test_invalid_add_response(self):
391 cert, issuer = _cert_and_issuer()

Callers

nothing calls this directly

Calls 2

add_responseMethod · 0.95
_cert_and_issuerFunction · 0.85

Tested by

no test coverage detected