From 6ecdbc409d2109a9e7fc5367c64067f0400f07cc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Jun 2009 00:12:45 +0000 Subject: - 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. --- repoze/bfg/tests/test_wsgi.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'repoze/bfg/tests/test_wsgi.py') diff --git a/repoze/bfg/tests/test_wsgi.py b/repoze/bfg/tests/test_wsgi.py index 9d8a85630..5d3ec1faa 100644 --- a/repoze/bfg/tests/test_wsgi.py +++ b/repoze/bfg/tests/test_wsgi.py @@ -17,15 +17,7 @@ class WSGIApp2Tests(unittest.TestCase): from repoze.bfg.wsgi import wsgiapp2 return wsgiapp2(app) - def test_decorator_traversed_is_None(self): - context = DummyContext() - request = DummyRequest() - request.traversed = None - decorator = self._callFUT(dummyapp) - response = decorator(context, request) - self.assertEqual(response, dummyapp) - - def test_decorator_traversed_not_None_with_subpath_and_view_name(self): + def test_decorator_with_subpath_and_view_name(self): context = DummyContext() request = DummyRequest() request.traversed = ['a', 'b'] @@ -39,7 +31,7 @@ class WSGIApp2Tests(unittest.TestCase): self.assertEqual(request.environ['PATH_INFO'], '/subpath') self.assertEqual(request.environ['SCRIPT_NAME'], '/foo/b/view_name') - def test_decorator_traversed_not_None_with_subpath_no_view_name(self): + def test_decorator_with_subpath_no_view_name(self): context = DummyContext() request = DummyRequest() request.traversed = ['a', 'b'] @@ -53,7 +45,7 @@ class WSGIApp2Tests(unittest.TestCase): self.assertEqual(request.environ['PATH_INFO'], '/subpath') self.assertEqual(request.environ['SCRIPT_NAME'], '/foo/b') - def test_decorator_traversed_not_None_no_subpath_with_view_name(self): + def test_decorator_no_subpath_with_view_name(self): context = DummyContext() request = DummyRequest() request.traversed = ['a', 'b'] -- cgit v1.2.3