Ticket #18210: reverse_prefix_failing_tests.patch

File reverse_prefix_failing_tests.patch, 1016 bytes (added by toofishes, 3 years ago)

Patch with three new failing tests

  • tests/regressiontests/urlpatterns_reverse/tests.py

     
    170170        # Reversing None should raise an error, not return the last un-named view.
    171171        self.assertRaises(NoReverseMatch, reverse, None)
    172172
     173    def test_prefix_braces(self):
     174        self.assertEqual('/%7B%7Binvalid%7D%7D/includes/non_path_include/',
     175                                reverse('non_path_include', prefix='/{{invalid}}/'))
     176
     177    def test_prefix_parenthesis(self):
     178        self.assertEqual('/bogus)/includes/non_path_include/',
     179                                reverse('non_path_include', prefix='/bogus)/'))
     180
     181    def test_prefix_format_char(self):
     182        self.assertEqual('/bump%20map/includes/non_path_include/',
     183                                reverse('non_path_include', prefix='/bump%20map/'))
     184
    173185class ResolverTests(unittest.TestCase):
    174186    def test_non_regex(self):
    175187        """
Back to Top