diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 12:15:25 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 12:18:34 +1200 |
commit | f03ce8107075567ea902b88ace2964ee035d45aa (patch) | |
tree | dd0e06fc9ddf4c4b9d04807aff18eea72d4bf52f /test/test_app.py | |
parent | 2d88d88f8c27b50f5d4d532ae54a8c643e6dc868 (diff) | |
download | mitmproxy-f03ce8107075567ea902b88ace2964ee035d45aa.tar.gz mitmproxy-f03ce8107075567ea902b88ace2964ee035d45aa.tar.bz2 mitmproxy-f03ce8107075567ea902b88ace2964ee035d45aa.zip |
Anchor management: list and remove anchors.
Diffstat (limited to 'test/test_app.py')
-rw-r--r-- | test/test_app.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_app.py b/test/test_app.py index 3a147385..e0060e82 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -6,7 +6,13 @@ class uApplication(libpry.AutoTree): def test_anchors(self): a = app.PathodApp(staticdir=None) a.add_anchor("/foo", "200") - assert a.handlers[0][1][0].handler_class.__name__ == "FixedPathod" + assert a.get_anchors() == [("/foo", "200")] + a.add_anchor("/bar", "400") + assert a.get_anchors() == [("/bar", "400"), ("/foo", "200")] + a.remove_anchor("/bar", "400") + assert a.get_anchors() == [("/foo", "200")] + a.remove_anchor("/oink", "400") + assert a.get_anchors() == [("/foo", "200")] class uPages(libpry.AutoTree): |