mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fix #20022: Correctly handle prefixes with url-unsafe characters in reverse().
This commit is contained in:
@@ -183,6 +183,11 @@ class URLPatternReverse(TestCase):
|
||||
self.assertEqual('/bump%2520map/includes/non_path_include/',
|
||||
reverse('non_path_include', prefix='/bump%20map/'))
|
||||
|
||||
def test_non_urlsafe_prefix_with_args(self):
|
||||
# Regression for #20022
|
||||
self.assertEqual('/%7Eme/places/1/',
|
||||
reverse('places', args=[1], prefix='/~me/'))
|
||||
|
||||
class ResolverTests(unittest.TestCase):
|
||||
def test_resolver_repr(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user