mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Added test for ResolverMatch.__repr__().
This commit is contained in:
parent
9d334e0a7a
commit
4d9f51f2b5
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user