From 7a49cdfef3d9f5eeaecf6d6c8938f0bb8da7c15d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 21 Jul 2012 20:50:41 +1200 Subject: More robust response handling. --- test/test_pathod.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/test_pathod.py') diff --git a/test/test_pathod.py b/test/test_pathod.py index a23b7c71..1484efcd 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -64,11 +64,13 @@ class _DaemonTests: scheme = "https" if self.SSL else "http" return requests.get("%s://localhost:%s/p/%s"%(scheme, self.d.port, spec), verify=False) - def pathoc(self, spec): + def pathoc(self, spec, timeout=None): c = pathoc.Pathoc("localhost", self.d.port) c.connect() if self.SSL: c.convert_to_ssl() + if timeout: + c.settimeout(timeout) return c.request(spec) def test_preline(self): @@ -114,6 +116,7 @@ class _DaemonTests: assert "foo" in l["msg"] + class TestDaemon(_DaemonTests): SSL = False -- cgit v1.2.3