From 332832278fa22827a831a7a7206b81c2619aff8c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 8 Jun 2015 16:25:33 +1200 Subject: 100% test coverage --- test/test_pathoc.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/test_pathoc.py') diff --git a/test/test_pathoc.py b/test/test_pathoc.py index 21e46e8c..d37cf9eb 100644 --- a/test/test_pathoc.py +++ b/test/test_pathoc.py @@ -185,6 +185,24 @@ class TestDaemon(_TestDaemon): def test_conn_err(self): assert "Invalid server response" in self.tval(["get:'/p/200:d2'"]) + def test_websocket_shutdown(self): + c = pathoc.Pathoc(("127.0.0.1", self.d.port), fp=None) + c.connect() + c.request("ws:/") + c.stop() + + def test_wait_finish(self): + c = pathoc.Pathoc( + ("127.0.0.1", self.d.port), + fp=None, + ws_read_limit = 1 + ) + c.connect() + c.request("ws:/") + c.request("wf:f'wf:x100'") + [i for i in c.wait(timeout=0, finish=False)] + [i for i in c.wait(timeout=0)] + def test_connect_fail(self): to = ("foobar", 80) c = pathoc.Pathoc(("127.0.0.1", self.d.port), fp=None) -- cgit v1.2.3