diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 12:05:38 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 12:05:38 +1200 |
commit | 2d88d88f8c27b50f5d4d532ae54a8c643e6dc868 (patch) | |
tree | 939eca7007597411b56c5990456f27f921798fa0 /test/test_app.py | |
parent | 7ca5c7ae90c32cfc238d893eb302acc06deb2e70 (diff) | |
download | mitmproxy-2d88d88f8c27b50f5d4d532ae54a8c643e6dc868.tar.gz mitmproxy-2d88d88f8c27b50f5d4d532ae54a8c643e6dc868.tar.bz2 mitmproxy-2d88d88f8c27b50f5d4d532ae54a8c643e6dc868.zip |
Basic anchor adding.
Diffstat (limited to 'test/test_app.py')
-rw-r--r-- | test/test_app.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/test_app.py b/test/test_app.py index 6355a88a..3a147385 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -2,8 +2,14 @@ import libpry from libpathod import app from tornado import httpserver - 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" + + +class uPages(libpry.AutoTree): def dummy_page(self, path): # A hideous, hideous kludge, but Tornado seems to have no more sensible # way to do this. @@ -15,9 +21,6 @@ class uApplication(libpry.AutoTree): del r.connection return klass(a, r) - def test_create(self): - assert app.PathodApp(staticdir=None) - def test_index(self): page = self.dummy_page("/") page.get() @@ -31,5 +34,6 @@ class uApplication(libpry.AutoTree): tests = [ - uApplication() + uApplication(), + uPages() ] |