summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2010-02-28 14:37:05 -0800
committerBen Bangert <ben@groovie.org>2010-02-28 14:37:05 -0800
commit544fb83fe3cc4df3e5295b71b205c611c4c1dd5a (patch)
treef632da5852876527ffb419b1714250ef93713f41 /tests
parent75c770d5c7f7bf1ff93b006dd663dd78cd87a14b (diff)
downloadroutes-544fb83fe3cc4df3e5295b71b205c611c4c1dd5a.tar.gz
* Fix url.current() not returning current args when explicit is True.
* Return explicit to being default to True. --HG-- branch : trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/test_functional/test_explicit_use.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_functional/test_explicit_use.py b/tests/test_functional/test_explicit_use.py
index 539d54f..359b6b0 100644
--- a/tests/test_functional/test_explicit_use.py
+++ b/tests/test_functional/test_explicit_use.py
@@ -71,3 +71,14 @@ class TestUtils(unittest.TestCase):
url = URLGenerator(m, {})
eq_('/here?q=fred&q=here%20now', url('/here', q=[u'fred', 'here now']))
+
+ def test_current(self):
+ m = Mapper()
+ m.explicit = True
+ m.connect('/hi/{fred}')
+
+ environ = {'HTTP_HOST': 'localhost.com', 'PATH_INFO': '/hi/smith'}
+ match = m.routematch(environ=environ)[0]
+ environ['wsgiorg.routing_args'] = (None, match)
+ url = URLGenerator(m, environ)
+ eq_('/hi/smith', url.current())