Added test for ResolverMatch.__repr__().
@@ -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):
