1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Added a test for mixing args and kwargs in reverse().

This commit is contained in:
Tim Graham 2017-09-14 07:03:06 -04:00
parent 0ec0e5029c
commit 7cc8507d9c

View File

@ -290,6 +290,11 @@ class URLPatternReverse(SimpleTestCase):
with self.assertRaises(NoReverseMatch):
reverse(None)
def test_mixing_args_and_kwargs(self):
msg = "Don't mix *args and **kwargs in call to reverse()!"
with self.assertRaisesMessage(ValueError, msg):
reverse('name', args=['a'], kwargs={'b': 'c'})
@override_script_prefix('/{{invalid}}/')
def test_prefix_braces(self):
self.assertEqual(