aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-06-28 12:16:02 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-06-28 12:16:02 +1200
commit4407508e0ce971b03358877844d409e16b244562 (patch)
treec121b8b15e548792a897fa6217164fcf873bc7a7 /test
parent6b6317e1de7d4168debe9fc3aa5427aab40f13fd (diff)
downloadmitmproxy-4407508e0ce971b03358877844d409e16b244562.tar.gz
mitmproxy-4407508e0ce971b03358877844d409e16b244562.tar.bz2
mitmproxy-4407508e0ce971b03358877844d409e16b244562.zip
Give some structure to the logging module
Diffstat (limited to 'test')
-rw-r--r--test/test_log.py3
-rw-r--r--test/tutils.py1
2 files changed, 3 insertions, 1 deletions
diff --git a/test/test_log.py b/test/test_log.py
index 0d5c6c61..2cac1e7c 100644
--- a/test/test_log.py
+++ b/test/test_log.py
@@ -15,8 +15,9 @@ class DummyIO(StringIO.StringIO):
def test_disconnect():
outf = DummyIO()
rw = DummyIO()
+ l = log.ConnectionLogger(outf, False, rw, rw)
try:
- with log.Log(outf, False, rw, rw) as lg:
+ with l.ctx() as lg:
lg("Test")
except netlib.tcp.NetLibDisconnect:
pass
diff --git a/test/tutils.py b/test/tutils.py
index 050fa108..9d9b687d 100644
--- a/test/tutils.py
+++ b/test/tutils.py
@@ -98,6 +98,7 @@ class DaemonTests(object):
ret.append(resp)
for frm in c.wait():
ret.append(frm)
+ c.stop()
return ret, logfp.getvalue()