(
ocsp_resp: ocsp.OCSPResponse,
this_update: datetime.datetime,
next_update: Optional[datetime.datetime],
revocation_time: Optional[datetime.datetime],
)
| 70 | |
| 71 | |
| 72 | def _check_ocsp_response_times( |
| 73 | ocsp_resp: ocsp.OCSPResponse, |
| 74 | this_update: datetime.datetime, |
| 75 | next_update: Optional[datetime.datetime], |
| 76 | revocation_time: Optional[datetime.datetime], |
| 77 | ) -> None: |
| 78 | with pytest.warns(utils.DeprecatedIn43): |
| 79 | assert ocsp_resp.this_update == this_update |
| 80 | assert ocsp_resp.this_update_utc == this_update.replace( |
| 81 | tzinfo=datetime.timezone.utc |
| 82 | ) |
| 83 | |
| 84 | with pytest.warns(utils.DeprecatedIn43): |
| 85 | assert ocsp_resp.next_update == next_update |
| 86 | assert ocsp_resp.next_update_utc == ( |
| 87 | next_update.replace(tzinfo=datetime.timezone.utc) |
| 88 | if next_update is not None |
| 89 | else None |
| 90 | ) |
| 91 | |
| 92 | with pytest.warns(utils.DeprecatedIn43): |
| 93 | assert ocsp_resp.revocation_time == revocation_time |
| 94 | assert ocsp_resp.revocation_time_utc == ( |
| 95 | revocation_time.replace(tzinfo=datetime.timezone.utc) |
| 96 | if revocation_time is not None |
| 97 | else None |
| 98 | ) |
| 99 | |
| 100 | |
| 101 | class TestOCSPRequest: |
no outgoing calls
no test coverage detected