aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_protocol_http.py3
-rw-r--r--test/test_server.py13
2 files changed, 10 insertions, 6 deletions
diff --git a/test/test_protocol_http.py b/test/test_protocol_http.py
index d2ba24de..18aad3b6 100644
--- a/test/test_protocol_http.py
+++ b/test/test_protocol_http.py
@@ -88,7 +88,6 @@ class TestHTTPResponse:
class TestInvalidRequests(tservers.HTTPProxTest):
ssl = True
-
def test_double_connect(self):
p = self.pathoc()
r = p.request("connect:'%s:%s'" % ("127.0.0.1", self.server2.port))
@@ -117,9 +116,7 @@ class TestProxyChaining(tservers.HTTPChainProxyTest):
class TestProxyChainingSSL(tservers.HTTPChainProxyTest):
ssl = True
-
def test_simple(self):
-
p = self.pathoc()
req = p.request("get:'/p/418:b\"content\"'")
assert req.content == "content"
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