aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_server.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-15 09:20:10 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-15 09:20:10 +1200
commita9495dc02fa0942d82e1247f875bb962872e8802 (patch)
treec52e505036f15650e78c2c327e8f617f30c6a289 /test/test_server.py
parent176d819559e01125c6fe2a34c86cb47c62f49b27 (diff)
downloadmitmproxy-a9495dc02fa0942d82e1247f875bb962872e8802.tar.gz
mitmproxy-a9495dc02fa0942d82e1247f875bb962872e8802.tar.bz2
mitmproxy-a9495dc02fa0942d82e1247f875bb962872e8802.zip
Refactor test suite to make room for transparent mode tests.
Diffstat (limited to 'test/test_server.py')
-rw-r--r--test/test_server.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/test_server.py b/test/test_server.py
index 296333d8..e54d3559 100644
--- a/test/test_server.py
+++ b/test/test_server.py
@@ -11,28 +11,32 @@ import tutils
for a 200 response.
"""
-class Sanity(tutils.ProxTest):
+class SanityMixin:
def test_http(self):
assert self.pathod("304").status_code == 304
assert self.log()
def test_large(self):
- assert len(self.pathod("200:b@500k").content) == 1024*500
+ assert len(self.pathod("200:b@50k").content) == 1024*50
-class TestHTTP(Sanity):
+class TestHTTP(tutils.HTTPProxTest, SanityMixin):
pass
-class TestHTTPS(Sanity):
+class TestHTTPS(tutils.HTTPProxTest, SanityMixin):
ssl = True
-class TestReverse(Sanity):
+class TestReverse(tutils.ReverseProxTest, SanityMixin):
reverse = True
-class TestProxy(tutils.ProxTest):
+class _TestTransparent():
+ transparent = True
+
+
+class TestProxy(tutils.HTTPProxTest):
def test_http(self):
f = self.pathod("304")
assert f.status_code == 304