diff options
author | Ben Bangert <ben@groovie.org> | 2010-02-28 15:02:56 -0800 |
---|---|---|
committer | Ben Bangert <ben@groovie.org> | 2010-02-28 15:02:56 -0800 |
commit | acc95ed092e9efe366f89ef92f6d7d975e3aa12a (patch) | |
tree | 081a6915859584d52a5054e7953602ed60e6be34 /tests | |
parent | c869cfe93361c60f8ea186ffb74cb3f407bc69d0 (diff) | |
download | routes-acc95ed092e9efe366f89ef92f6d7d975e3aa12a.tar.gz |
* Fix bug with mapper.extend and Routes modifying their original args.
Fixes #24.
--HG--
branch : trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_functional/test_explicit_use.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_functional/test_explicit_use.py b/tests/test_functional/test_explicit_use.py index 359b6b0..4cf1244 100644 --- a/tests/test_functional/test_explicit_use.py +++ b/tests/test_functional/test_explicit_use.py @@ -3,6 +3,7 @@ import os, sys, time, unittest from nose.tools import eq_, assert_raises from routes import * +from routes.route import Route from routes.util import GenerationException class TestUtils(unittest.TestCase): @@ -82,3 +83,12 @@ class TestUtils(unittest.TestCase): environ['wsgiorg.routing_args'] = (None, match) url = URLGenerator(m, environ) eq_('/hi/smith', url.current()) + + def test_add_routes(self): + map = Mapper(explicit=True) + map.minimization = False + routes = [ + Route('foo', '/foo',) + ] + map.extend(routes) + eq_(map.match('/foo'), {}) |