diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-04-20 08:56:47 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-04-20 08:56:47 +1200 |
commit | be450cf9db1d819b1023029c8d403f401e010c98 (patch) | |
tree | 2f69ceb926cb95b809a5a0e1aa851e3401e709b2 /test | |
parent | 3891fe56385b323b435392aadb3f55848ee30857 (diff) | |
download | mitmproxy-be450cf9db1d819b1023029c8d403f401e010c98.tar.gz mitmproxy-be450cf9db1d819b1023029c8d403f401e010c98.tar.bz2 mitmproxy-be450cf9db1d819b1023029c8d403f401e010c98.zip |
Whitespace, small fixes.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pathoc.py | 8 | ||||
-rw-r--r-- | test/test_pathod.py | 2 | ||||
-rw-r--r-- | test/tutils.py | 24 |
3 files changed, 17 insertions, 17 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py index 598b2c81..90f798c9 100644 --- a/test/test_pathoc.py +++ b/test/test_pathoc.py @@ -18,10 +18,10 @@ class _TestDaemon: @classmethod def setUpAll(self): self.d = test.Daemon( - ssl=self.ssl, - ssloptions=self.ssloptions, - staticdir=tutils.test_data.path("data"), - anchors=[ + ssl = self.ssl, + ssloptions = self.ssloptions, + staticdir = tutils.test_data.path("data"), + anchors = [ (re.compile("/anchor/.*"), language.parse_response("202")) ] ) diff --git a/test/test_pathod.py b/test/test_pathod.py index 3638960e..c32f6e84 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -3,7 +3,7 @@ from netlib import tcp, http import tutils -class TestPathod: +class TestPathod(object): def test_logging(self): p = pathod.Pathod(("127.0.0.1", 0)) assert len(p.get_log()) == 0 diff --git a/test/tutils.py b/test/tutils.py index c1e55a61..18b5fb78 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -7,7 +7,7 @@ from libpathod import utils, test, pathoc, pathod, language import requests -class DaemonTests: +class DaemonTests(object): noweb = False noapi = False nohang = False @@ -17,24 +17,24 @@ class DaemonTests: ssloptions = None @classmethod - def setUpAll(self): - opts = self.ssloptions or {} - self.confdir = tempfile.mkdtemp() - opts["confdir"] = self.confdir + def setUpAll(klass): + opts = klass.ssloptions or {} + klass.confdir = tempfile.mkdtemp() + opts["confdir"] = klass.confdir so = pathod.SSLOptions(**opts) - self.d = test.Daemon( + klass.d = test.Daemon( staticdir=test_data.path("data"), anchors=[ (re.compile("/anchor/.*"), language.parse_response("202:da")) ], - ssl = self.ssl, + ssl = klass.ssl, ssloptions = so, sizelimit=1*1024*1024, - noweb = self.noweb, - noapi = self.noapi, - nohang = self.nohang, - timeout = self.timeout, - hexdump = self.hexdump, + noweb = klass.noweb, + noapi = klass.noapi, + nohang = klass.nohang, + timeout = klass.timeout, + hexdump = klass.hexdump, logreq = True, logresp = True, explain = True |