diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-30 17:43:01 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-30 17:43:01 +1200 |
commit | a09f3e06c36f440b9975cbdb8379734eae9f47cc (patch) | |
tree | 51758aa1fb09962f64cbd46ff07ebe37f0fcc07e /test/test_pathod.py | |
parent | 4ed5043c67848bf717e48bc509d959422c8faeb6 (diff) | |
download | mitmproxy-a09f3e06c36f440b9975cbdb8379734eae9f47cc.tar.gz mitmproxy-a09f3e06c36f440b9975cbdb8379734eae9f47cc.tar.bz2 mitmproxy-a09f3e06c36f440b9975cbdb8379734eae9f47cc.zip |
Factor logger out of pathoc, use it in pathod as well.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r-- | test/test_pathod.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py index 7f07c041..5ff3e68c 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -1,3 +1,4 @@ +import cStringIO from libpathod import pathod, version from netlib import tcp, http import tutils @@ -5,7 +6,8 @@ import tutils class TestPathod(object): def test_logging(self): - p = pathod.Pathod(("127.0.0.1", 0)) + s = cStringIO.StringIO() + p = pathod.Pathod(("127.0.0.1", 0), logfp=s) assert len(p.get_log()) == 0 id = p.add_log(dict(s="foo")) assert p.log_by_id(id) |