diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-10-19 11:48:51 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-10-19 11:48:51 +1300 |
commit | 87629586ae5add2d605b55e65cebc1e144c612d9 (patch) | |
tree | fe5946f7e82ff9328a8cff0b1ad6a4c660a1b742 /test | |
parent | 85015fe561547a51bc229318287920d31caec985 (diff) | |
download | mitmproxy-87629586ae5add2d605b55e65cebc1e144c612d9.tar.gz mitmproxy-87629586ae5add2d605b55e65cebc1e144c612d9.tar.bz2 mitmproxy-87629586ae5add2d605b55e65cebc1e144c612d9.zip |
web app cleanups: tests and examples
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/builtins/test_wsgiapp.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/test/mitmproxy/builtins/test_wsgiapp.py b/test/mitmproxy/builtins/test_wsgiapp.py index c8991892..a39ec5c3 100644 --- a/test/mitmproxy/builtins/test_wsgiapp.py +++ b/test/mitmproxy/builtins/test_wsgiapp.py @@ -33,29 +33,9 @@ class TestApp(tservers.HTTPProxyTest): ret = p.request("get:'http://testapp/'") assert ret.status_code == 200 - def _test_app_err(self): + def test_app_err(self): p = self.pathoc() with p.connect(): ret = p.request("get:'http://errapp/'") assert ret.status_code == 500 assert b"ValueError" in ret.content - - -def _test_app_registry(): - ar = flow.AppRegistry() - ar.add("foo", "domain", 80) - - r = HTTPRequest.wrap(netlib.tutils.treq()) - r.host = "domain" - r.port = 80 - assert ar.get(r) - - r.port = 81 - assert not ar.get(r) - - r = HTTPRequest.wrap(netlib.tutils.treq()) - r.host = "domain2" - r.port = 80 - assert not ar.get(r) - r.headers["host"] = "domain" - assert ar.get(r) |