From a09f3e06c36f440b9975cbdb8379734eae9f47cc Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 30 May 2015 17:43:01 +1200 Subject: Factor logger out of pathoc, use it in pathod as well. --- test/test_pathod.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/test_pathod.py') 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) -- cgit v1.2.3