aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_server.py')
-rw-r--r--test/test_server.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/test_server.py b/test/test_server.py
index 2f9e6728..a86c095c 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -206,13 +206,20 @@ class TestHTTPSCertfile(tservers.HTTPProxTest, CommonMixin):
def test_certfile(self):
assert self.pathod("304")
-class TestHTTPSNoCommonName(tservers.HTTPProxTest, CommonMixin):
+
+class TestHTTPSNoCommonName(tservers.HTTPProxTest):
"""
Test what happens if we get a cert without common name back.
"""
ssl = True
- ssloptions=pathod.SSLOptions(certfile=tutils.test_data.path("data/no_common_name.pem"),
- keyfile=tutils.test_data.path("data/no_common_name.pem"))
+ ssloptions=pathod.SSLOptions(
+ certfile = tutils.test_data.path("data/no_common_name.pem"),
+ cacert = tutils.test_data.path("data/no_common_name.pem"),
+ )
+ def test_http(self):
+ f = self.pathod("202")
+ assert f.sslinfo.certchain[0].get_subject().CN == "127.0.0.1"
+
class TestReverse(tservers.ReverseProxTest, CommonMixin):
reverse = True