diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pathod.py | 13 | ||||
-rw-r--r-- | test/tutils.py | 7 |
2 files changed, 14 insertions, 6 deletions
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") diff --git a/test/tutils.py b/test/tutils.py index b1e277e7..1eb78980 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -5,6 +5,7 @@ import requests class DaemonTests: noweb = False + noapi = False ssl = False @classmethod def setUpAll(self): @@ -13,7 +14,8 @@ class DaemonTests: anchors=[("/anchor/.*", "202")], ssl = self.ssl, sizelimit=1*1024*1024, - noweb = self.noweb + noweb = self.noweb, + noapi = self.noapi ) @classmethod @@ -21,7 +23,8 @@ class DaemonTests: self.d.shutdown() def setUp(self): - self.d.clear_log() + if not (self.noweb or self.noapi): + self.d.clear_log() def getpath(self, path, params=None): scheme = "https" if self.ssl else "http" |