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
1 changed files with 5 additions and 0 deletions

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(