diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-19 10:42:55 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-19 10:42:55 +1200 |
commit | 7cb242c168501d3f67ddc81dbdc3a96097981e8b (patch) | |
tree | 56878f5a1f48da99b671d906921a2bd032fc88f8 /test/test_proxy.py | |
parent | 1b1ccab8b7f88c9e7e6f1d5ae8d6782bc9a1ac2e (diff) | |
download | mitmproxy-7cb242c168501d3f67ddc81dbdc3a96097981e8b.tar.gz mitmproxy-7cb242c168501d3f67ddc81dbdc3a96097981e8b.tar.bz2 mitmproxy-7cb242c168501d3f67ddc81dbdc3a96097981e8b.zip |
Move wsgi to netlib.
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r-- | test/test_proxy.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py index 1e1369df..08b3634f 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -10,3 +10,16 @@ class TestProxyError: p = proxy.ProxyError(111, "msg") assert repr(p) + +class TestAppRegistry: + def test_add_get(self): + ar = proxy.AppRegistry() + ar.add("foo", "domain", 80) + + r = tutils.treq() + r.host = "domain" + r.port = 80 + assert ar.get(r) + + r.port = 81 + assert not ar.get(r) |