From cb397ec788519069aeb785f4a635f30a897288b5 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 6 Feb 2014 00:53:39 +0100 Subject: fix bugs, expose timestamp information to console ui --- test/test_dump.py | 2 +- test/test_flow.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_dump.py b/test/test_dump.py index 314356fc..8b4b9aa5 100644 --- a/test/test_dump.py +++ b/test/test_dump.py @@ -27,7 +27,7 @@ class TestDumpMaster: cc = req.flow.client_conn cc.reply = mock.MagicMock() m.handle_clientconnect(cc) - sc = proxy.ServerConnection((req.host, req.port), None) + sc = proxy.ServerConnection((req.get_host(), req.get_port()), None) sc.reply = mock.MagicMock() m.handle_serverconnection(sc) m.handle_request(req) diff --git a/test/test_flow.py b/test/test_flow.py index f28697c1..006dfe51 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -13,8 +13,7 @@ def test_app_registry(): ar.add("foo", "domain", 80) r = tutils.treq() - r.host = "domain" - r.port = 80 + r.set_url("http://domain:80/") assert ar.get(r) r.port = 81 @@ -587,7 +586,7 @@ class TestFlowMaster: req = tutils.treq() fm.handle_clientconnect(req.flow.client_conn) assert fm.scripts[0].ns["log"][-1] == "clientconnect" - sc = proxy.ServerConnection((req.host, req.port), None) + sc = proxy.ServerConnection((req.get_host(), req.get_port()), None) sc.reply = controller.DummyReply() fm.handle_serverconnection(sc) assert fm.scripts[0].ns["log"][-1] == "serverconnect" -- cgit v1.2.3