From f03ce8107075567ea902b88ace2964ee035d45aa Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 29 Apr 2012 12:15:25 +1200 Subject: Anchor management: list and remove anchors. --- test/test_app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test') 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): -- cgit v1.2.3