From 8cfbc2f80eb186e0958b7fbf7b9f70dca37389f7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 25 Jul 2012 10:34:57 +1200 Subject: Refactor test.py, add unit tests for app.py corner case. --- test/test_pathod.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/test_pathod.py') diff --git a/test/test_pathod.py b/test/test_pathod.py index 58477620..036fbf0b 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -29,15 +29,20 @@ class TestPathod: class TestNoWeb(tutils.DaemonTests): noweb = True - def setUp(self): - # Over ride log clearing - pass - def test_noweb(self): assert self.get("200").status_code == 200 assert self.getpath("/").status_code == 800 +class TestNoApi(tutils.DaemonTests): + noapi = True + def test_noapi(self): + assert self.getpath("/log").status_code == 404 + r = self.getpath("/") + assert r.status_code == 200 + assert not "Log" in r.content + + class CommonTests(tutils.DaemonTests): def test_sizelimit(self): r = self.get("200:b@1g") -- cgit v1.2.3