diff options
Diffstat (limited to 'test/test_server.py')
-rw-r--r-- | test/test_server.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/test/test_server.py b/test/test_server.py index 09cfa381..85c766eb 100644 --- a/test/test_server.py +++ b/test/test_server.py @@ -314,21 +314,24 @@ class TestHTTPAuth(tservers.HTTPProxTest): class TestHTTPS(tservers.HTTPProxTest, CommonMixin, TcpMixin): ssl = True ssloptions = pathod.SSLOptions(request_client_cert=True) - clientcerts = True - - def test_clientcert(self): - self.config.clientcerts = os.path.join( - tutils.test_data.path("data/clientcert"), "client.pem") - f = self.pathod("304") - assert f.status_code == 304 - assert self.server.last_log()["request"]["clientcert"]["keyinfo"] - - def test_clientcerts(self): - self.config.clientcerts = tutils.test_data.path("data/clientcert") - f = self.pathod("304") - assert f.status_code == 304 - assert self.server.last_log()["request"]["clientcert"]["keyinfo"] + def test_clientcert_file(self): + try: + self.config.clientcerts = os.path.join( + tutils.test_data.path("data/clientcert"), "client.pem") + f = self.pathod("304") + assert f.status_code == 304 + assert self.server.last_log()["request"]["clientcert"]["keyinfo"] + finally: + self.config.clientcerts = None + def test_clientcert_dir(self): + try: + self.config.clientcerts = tutils.test_data.path("data/clientcert") + f = self.pathod("304") + assert f.status_code == 304 + assert self.server.last_log()["request"]["clientcert"]["keyinfo"] + finally: + self.config.clientcerts = None def test_error_post_connect(self): p = self.pathoc() assert p.request("get:/:i0,'invalid\r\n\r\n'").status_code == 400 |