def test_is_certificate_valid_false(vault_ca_obj, monkeypatch):
class MockX509(OpenSSL.crypto.X509):
def get_notAfter(self):
return b'20000510141643Z'
monkeypatch.setattr(OpenSSL.crypto, 'X509', MockX509)
assert not vault_ca_obj._is_certificate_valid('tests/fixtures/acomponent-test.test.org.pem.ok')
评论列表
文章目录