mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
fix tests
This commit is contained in:
parent
f6787d2b2f
commit
0567c5fe4d
2 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,6 @@
|
|||
"""Tests for certbot_apache._internal.apache_util."""
|
||||
import unittest
|
||||
|
||||
import certbot.tests.util as test_util
|
||||
|
||||
|
||||
|
|
@ -13,3 +15,7 @@ class CertFingerprintTest(unittest.TestCase):
|
|||
cert_sha1_fingerprint(cert_path),
|
||||
b'\t\xf8\xce\x01E\r(\x84g\xc32j\xc0E~5\x199\xc7.'
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main() # pragma: no cover
|
||||
|
|
|
|||
|
|
@ -220,9 +220,9 @@ class OCSPPrefetchTest(util.ApacheTest):
|
|||
|
||||
@mock.patch("certbot_apache._internal.constants.OCSP_INTERNAL_TTL", 0)
|
||||
def test_ocsp_prefetch_refresh(self):
|
||||
def ocsp_req_mock(_cert, _chain, _timeout, workfile):
|
||||
def ocsp_req_mock(_cert, _chain, response_file):
|
||||
"""Method to mock the OCSP request and write response to file"""
|
||||
with open(workfile, 'w') as fh:
|
||||
with open(response_file, 'w') as fh:
|
||||
fh.write("MOCKRESPONSE")
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue