diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-09 10:58:28 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-09 10:58:28 +1200 |
commit | e49c920d161fcd1a4bc75ba981ffabd188dd0f00 (patch) | |
tree | 62789f7021027bc0b5ed59c0e55fed8009d4819d /test/test_proxy.py | |
parent | 3749d52b66d7db47188459c36d316136fee5f317 (diff) | |
download | mitmproxy-e49c920d161fcd1a4bc75ba981ffabd188dd0f00.tar.gz mitmproxy-e49c920d161fcd1a4bc75ba981ffabd188dd0f00.tar.bz2 mitmproxy-e49c920d161fcd1a4bc75ba981ffabd188dd0f00.zip |
Refator server tests to use flow.FlowMaster and flow.State
Diffstat (limited to 'test/test_proxy.py')
-rw-r--r-- | test/test_proxy.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py index 08b3634f..d4d275b5 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -5,21 +5,19 @@ from libmproxy import proxy, flow import tutils -class TestProxyError: - def test_simple(self): - p = proxy.ProxyError(111, "msg") - assert repr(p) +def test_proxy_error(): + p = proxy.ProxyError(111, "msg") + assert str(p) -class TestAppRegistry: - def test_add_get(self): - ar = proxy.AppRegistry() - ar.add("foo", "domain", 80) +def test_app_registry(): + ar = proxy.AppRegistry() + ar.add("foo", "domain", 80) - r = tutils.treq() - r.host = "domain" - r.port = 80 - assert ar.get(r) + r = tutils.treq() + r.host = "domain" + r.port = 80 + assert ar.get(r) - r.port = 81 - assert not ar.get(r) + r.port = 81 + assert not ar.get(r) |