Commit 527cb56b authored by Vincent Pelletier's avatar Vincent Pelletier

caucase.test: Remove coverage expectation on a few code paths.

4 branches depend on how tests are written, and are indeed not currently
used.
1 branch depend on test process environment.
parent fa365d89
Pipeline #10160 failed with stage
in 0 seconds
......@@ -410,9 +410,9 @@ class CaucaseTest(unittest.TestCase):
"""
Build a reasonably-realistic CA, return key & self-signed cert.
"""
if not_before is None:
if not_before is None: # pragma: no cover
not_before = datetime.datetime.utcnow()
if not_after is None:
if not_after is None: # pragma: no cover
not_after = not_before + datetime.timedelta(10, 0)
private_key = utils.generatePrivateKey(2048)
subject = x509.Name([
......@@ -479,9 +479,9 @@ class CaucaseTest(unittest.TestCase):
"""
Build a reasonably-realistic signed cert, return key & self-signed cert.
"""
if not_before is None:
if not_before is None: # pragma: no cover
not_before = datetime.datetime.utcnow()
if not_after is None:
if not_after is None: # pragma: no cover
not_after = not_before + datetime.timedelta(10, 0)
crt_key = utils.generatePrivateKey(2048)
return crt_key, x509.CertificateBuilder(
......@@ -2990,7 +2990,7 @@ class CaucaseTest(unittest.TestCase):
os.unlink(self._server_key)
os.unlink(self._server_db)
port = urlparse.urlparse(self._caucase_url).port
if port:
if port: # pragma: no cover
netloc += ':%s' % port
self._server_netloc = netloc
self._caucase_url = 'http://' + netloc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment