aboutsummaryrefslogtreecommitdiffstats
path: root/test/tutils.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/tutils.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/tutils.py')
-rw-r--r--test/tutils.py7
1 files changed, 5 insertions, 2 deletions
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"