diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-06-22 00:12:45 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-06-22 00:12:45 +0000 |
| commit | 6ecdbc409d2109a9e7fc5367c64067f0400f07cc (patch) | |
| tree | 37a01b7f6d9c9fe10f8201bf67d89dfd480e9072 /repoze/bfg/tests/test_urldispatch.py | |
| parent | 352276d69311cbd2ec4985b4e809b607102c2dab (diff) | |
| download | pyramid-6ecdbc409d2109a9e7fc5367c64067f0400f07cc.tar.gz pyramid-6ecdbc409d2109a9e7fc5367c64067f0400f07cc.tar.bz2 pyramid-6ecdbc409d2109a9e7fc5367c64067f0400f07cc.zip | |
- Adding ``*path_info`` to a route no longer changes the PATH_INFO for
a request that matches using URL dispatch. This feature was only
there to service the ``repoze.bfg.wsgi.wsgiapp2`` decorator and it
did it wrong; use ``*subpath`` instead now.
- The interface generation performed for named request factories had the
wrong base classes.
Diffstat (limited to 'repoze/bfg/tests/test_urldispatch.py')
| -rw-r--r-- | repoze/bfg/tests/test_urldispatch.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/repoze/bfg/tests/test_urldispatch.py b/repoze/bfg/tests/test_urldispatch.py index eb3be4323..68fda032d 100644 --- a/repoze/bfg/tests/test_urldispatch.py +++ b/repoze/bfg/tests/test_urldispatch.py @@ -70,54 +70,6 @@ class RoutesRootFactoryTests(unittest.TestCase): self.assertEqual(environ['bfg.routes.matchdict'], {}) self.assertEqual(environ['wsgiorg.routing_args'], ((), {})) - def test_matches_with_path_info_no_scriptname(self): - root_factory = make_get_root(123) - mapper = self._makeOne(root_factory) - mapper.connect('root', '/a/b/*path_info') - environ = self._getEnviron(PATH_INFO='/a/b/c/d') - result = mapper(environ) - self.assertEqual(result, 123) - self.assertEqual(environ['bfg.routes.route'].name, 'root') - self.assertEqual(environ['bfg.routes.matchdict'], {'path_info':'c/d'}) - self.assertEqual(environ['PATH_INFO'], '/c/d') - self.assertEqual(environ['SCRIPT_NAME'], '/a/b') - - def test_matches_with_path_info_with_scriptname(self): - root_factory = make_get_root(123) - mapper = self._makeOne(root_factory) - mapper.connect('root', '/a/b/*path_info') - environ = self._getEnviron(PATH_INFO='/a/b/c/d', SCRIPT_NAME='z') - result = mapper(environ) - self.assertEqual(result, 123) - self.assertEqual(environ['bfg.routes.route'].name, 'root') - self.assertEqual(environ['bfg.routes.matchdict'], {'path_info':'c/d'}) - self.assertEqual(environ['PATH_INFO'], '/c/d') - self.assertEqual(environ['SCRIPT_NAME'], 'z/a/b') - - def test_matches_PATH_INFO_w_extra_slash(self): - root_factory = make_get_root(123) - mapper = self._makeOne(root_factory) - mapper.connect('root', '/a/b/*path_info') - environ = self._getEnviron(PATH_INFO='/a/b//c/d', SCRIPT_NAME='') - result = mapper(environ) - self.assertEqual(result, 123) - self.assertEqual(environ['bfg.routes.route'].name, 'root') - self.assertEqual(environ['bfg.routes.matchdict'], {'path_info':'/c/d'}) - self.assertEqual(environ['PATH_INFO'], '/c/d') - self.assertEqual(environ['SCRIPT_NAME'], '/a/b') - - def test_matches_SCRIPT_NAME_endswith_slash(self): - root_factory = make_get_root(123) - mapper = self._makeOne(root_factory) - mapper.connect('root', '/a/b//*path_info') - environ = self._getEnviron(PATH_INFO='/a/b//c/d', SCRIPT_NAME='') - result = mapper(environ) - self.assertEqual(result, 123) - self.assertEqual(environ['bfg.routes.route'].name, 'root') - self.assertEqual(environ['bfg.routes.matchdict'], {'path_info':'c/d'}) - self.assertEqual(environ['PATH_INFO'], '/c/d') - self.assertEqual(environ['SCRIPT_NAME'], '/a/b') - def test_unicode_in_route_default(self): root_factory = make_get_root(123) mapper = self._makeOne(root_factory) |
