summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2010-02-28 15:02:56 -0800
committerBen Bangert <ben@groovie.org>2010-02-28 15:02:56 -0800
commitacc95ed092e9efe366f89ef92f6d7d975e3aa12a (patch)
tree081a6915859584d52a5054e7953602ed60e6be34 /tests
parentc869cfe93361c60f8ea186ffb74cb3f407bc69d0 (diff)
downloadroutes-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.py10
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'), {})