diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_functional/test_explicit_use.py | 11 |
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()) |