aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r--test/test_proxy.py13
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)