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