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.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test_server.py b/test/test_server.py
index 26770f29..7f93c729 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -205,7 +205,10 @@ class TestHTTP(tservers.HTTPProxTest, CommonMixin, AppMixin):
# Now check that the connection is closed as the client specifies
p = self.pathoc()
assert p.request("get:'%s':h'Connection'='close'"%response)
- tutils.raises("disconnect", p.request, "get:'%s'"%response)
+ # There's a race here, which means we can get any of a number of errors.
+ # Rather than introduce yet another sleep into the test suite, we just
+ # relax the Exception specification.
+ tutils.raises(Exception, p.request, "get:'%s'"%response)
def test_reconnect(self):
req = "get:'%s/p/200:b@1:da'"%self.server.urlbase
@@ -350,7 +353,9 @@ class TestHttps2Http(tservers.ReverseProxTest):
"""
Returns a connected Pathoc instance.
"""
- p = libpathod.pathoc.Pathoc(("localhost", self.proxy.port), ssl=ssl, sni=sni)
+ p = libpathod.pathoc.Pathoc(
+ ("localhost", self.proxy.port), ssl=ssl, sni=sni, fp=None
+ )
p.connect()
return p
@@ -377,7 +382,7 @@ class TestTransparentSSL(tservers.TransparentProxTest, CommonMixin, TcpMixin):
ssl = True
def test_sslerr(self):
- p = pathoc.Pathoc(("localhost", self.proxy.port))
+ p = pathoc.Pathoc(("localhost", self.proxy.port), fp=None)
p.connect()
r = p.request("get:/")
assert r.status_code == 400