(self)
| 37 | assert not Certificate(CERT1).has_expired() |
| 38 | |
| 39 | def test_has_expired_mock(self): |
| 40 | x = Certificate(CERT1) |
| 41 | |
| 42 | x._cert = Mock(name='cert') |
| 43 | time_after = datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=-1) |
| 44 | x._cert.not_valid_after_utc = time_after |
| 45 | |
| 46 | assert x.has_expired() is True |
| 47 | |
| 48 | def test_has_not_expired_mock(self): |
| 49 | x = Certificate(CERT1) |
nothing calls this directly
no test coverage detected