aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-07-25 10:34:57 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-07-25 10:34:57 +1200
commit8cfbc2f80eb186e0958b7fbf7b9f70dca37389f7 (patch)
treec18289e1f5ac0f8d1c9ec958fbe82e24a4b7eff7 /test/test_pathod.py
parente1df7f47a670e5f2f3cfb27d77efecec1157333e (diff)
downloadmitmproxy-8cfbc2f80eb186e0958b7fbf7b9f70dca37389f7.tar.gz
mitmproxy-8cfbc2f80eb186e0958b7fbf7b9f70dca37389f7.tar.bz2
mitmproxy-8cfbc2f80eb186e0958b7fbf7b9f70dca37389f7.zip
Refactor test.py, add unit tests for app.py corner case.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py13
1 files changed, 9 insertions, 4 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")