diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py index 65024aeb0f..8db38482ba 100644 --- a/tests/urlpatterns_reverse/tests.py +++ b/tests/urlpatterns_reverse/tests.py @@ -1125,6 +1125,14 @@ class ResolverMatchTests(SimpleTestCase): request = HttpRequest() self.assertIsNone(request.resolver_match) + def test_repr(self): + self.assertEqual( + repr(resolve('/no_kwargs/42/37/')), + "ResolverMatch(func=urlpatterns_reverse.views.empty_view, " + "args=('42', '37'), kwargs={}, url_name=no-kwargs, app_names=[], " + "namespaces=[])" + ) + @override_settings(ROOT_URLCONF='urlpatterns_reverse.erroneous_urls') class ErroneousViewTests(SimpleTestCase):