From a9495dc02fa0942d82e1247f875bb962872e8802 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 15 Jun 2012 09:20:10 +1200 Subject: Refactor test suite to make room for transparent mode tests. --- test/test_server.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'test/test_server.py') 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 -- cgit v1.2.3