diff options
| author | Michael Merickel <michael@merickel.org> | 2018-11-14 21:26:39 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2018-11-14 21:27:08 -0600 |
| commit | 78dcc6dff88829831ead187804ac9233eafab52e (patch) | |
| tree | 9a75d95c7cd31c68e8df55b495d0ed7d0d9d2449 /tests/test_urldispatch.py | |
| parent | a705f56c3ebf34f25ab567d85b7d5b421983aa4a (diff) | |
| download | pyramid-78dcc6dff88829831ead187804ac9233eafab52e.tar.gz pyramid-78dcc6dff88829831ead187804ac9233eafab52e.tar.bz2 pyramid-78dcc6dff88829831ead187804ac9233eafab52e.zip | |
remove several places supporting bytes for py2
Diffstat (limited to 'tests/test_urldispatch.py')
| -rw-r--r-- | tests/test_urldispatch.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py index 9296a50e1..a74731730 100644 --- a/tests/test_urldispatch.py +++ b/tests/test_urldispatch.py @@ -140,6 +140,23 @@ class RoutesMapperTests(unittest.TestCase): request.registry = get_current_registry() self.assertRaises(URLDecodeError, mapper, request) + def test___call__pathinfo_KeyError(self): + from pyramid.threadlocal import get_current_registry + + class DummyRequest: + @property + def path_info(self): + # if the PATH_INFO is missing from the environ + raise KeyError + + mapper = self._makeOne() + mapper.connect('root', '') + request = DummyRequest() + request.registry = get_current_registry() + result = mapper(request) + self.assertEqual(result['route'], mapper.routes['root']) + self.assertEqual(result['match'], {}) + def test___call__route_matches(self): mapper = self._makeOne() mapper.connect('foo', 'archives/:action/:article') |
