From f0fd33fb11513a3e74079eaed5f5c1b8bb4e561d Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 21 Jun 2012 15:39:40 +1200 Subject: Log inspection and manipulation from tests. --- test/test_test.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/test_test.py') diff --git a/test/test_test.py b/test/test_test.py index c3743a42..36d77fd5 100644 --- a/test/test_test.py +++ b/test/test_test.py @@ -6,7 +6,7 @@ import tutils logging.disable(logging.CRITICAL) class TestDaemonManual: - def test_startstop(self): + def test_simple(self): d = test.Daemon() rsp = requests.get("http://localhost:%s/p/202"%d.port) assert rsp.ok @@ -46,3 +46,10 @@ class TestDaemon: def test_info(self): assert tuple(self.d.info()["version"]) == version.IVERSION + + def test_logs(self): + rsp = requests.get("http://localhost:%s/p/202"%self.d.port) + assert len(self.d.log()) == 1 + assert self.d.clear_log() + assert len(self.d.log()) == 0 + -- cgit v1.2.3