pyramid/tests/test_urldispatch.py | ●●●●● patch | view | raw | blame | history | |
pyramid/urldispatch.py | ●●●●● patch | view | raw | blame | history |
pyramid/tests/test_urldispatch.py
@@ -522,6 +522,17 @@ self.generates('/foo/:_abc', {'_abc':'20'}, '/foo/20') self.generates('/foo/:abc_def', {'abc_def':'20'}, '/foo/20') class Test_get_remainder_name(unittest.TestCase): def _callFUT(self, pattern): from pyramid.urldispatch import get_remainder_name return get_remainder_name(pattern) def test_it_nostararg(self): self.assertEqual(self._callFUT('/bob'), None) def test_it_withstararg(self): self.assertEqual(self._callFUT('/bob*dean'), 'dean') class DummyContext(object): """ """ pyramid/urldispatch.py
@@ -92,7 +92,7 @@ # stolen from bobo and modified old_route_re = re.compile(r'(\:[_a-zA-Z]\w*)') star_at_end = re.compile(r'(\*\w*)$') star_at_end = re.compile(r'\*(\w*)$') # The tortuous nature of the regex named ``route_re`` below is due to the # fact that we need to support at least one level of "inner" squigglies