aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pathoc.py')
-rw-r--r--test/test_pathoc.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py
index 784e2ee3..15493e96 100644
--- a/test/test_pathoc.py
+++ b/test/test_pathoc.py
@@ -24,6 +24,17 @@ class TestDaemon:
_, _, _, _, content = c.request("get:/api/info")
assert tuple(json.loads(content)["version"]) == version.IVERSION
+ def test_timeout(self):
+ c = pathoc.Pathoc("127.0.0.1", self.d.port)
+ c.connect()
+ c.settimeout(0.01)
+
+ s = cStringIO.StringIO()
+ c.print_requests(
+ ["get:'/p/200:p10,0'"], True, True, s
+ )
+ assert "Timeout" in s.getvalue()
+
def tval(self, requests, verbose=False):
c = pathoc.Pathoc("127.0.0.1", self.d.port)
c.connect()