From 2d88d88f8c27b50f5d4d532ae54a8c643e6dc868 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 29 Apr 2012 12:05:38 +1200 Subject: Basic anchor adding. --- test/test_app.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test/test_app.py') 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() ] -- cgit v1.2.3