From 16411b8400ad08f90c236bb2e18f65c655f903f8 Mon Sep 17 00:00:00 2001 From: Marten Kenbeek Date: Wed, 30 Dec 2015 16:51:16 +0100 Subject: Fixed #26013 -- Moved django.core.urlresolvers to django.urls. Thanks to Tim Graham for the review. --- docs/topics/testing/tools.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'docs/topics/testing') diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index f9e302a0c1..d66f8df5ba 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -507,9 +507,8 @@ Specifically, a ``Response`` object has the following attributes: .. attribute:: resolver_match - An instance of :class:`~django.core.urlresolvers.ResolverMatch` for the - response. You can use the - :attr:`~django.core.urlresolvers.ResolverMatch.func` attribute, for + An instance of :class:`~django.urls.ResolverMatch` for the response. + You can use the :attr:`~django.urls.ResolverMatch.func` attribute, for example, to verify the view that served the response:: # my_view here is a function based view @@ -520,7 +519,7 @@ Specifically, a ``Response`` object has the following attributes: self.assertEqual(response.resolver_match.func.__name__, MyView.as_view().__name__) If the given URL is not found, accessing this attribute will raise a - :exc:`~django.core.urlresolvers.Resolver404` exception. + :exc:`~django.urls.Resolver404` exception. You can also use dictionary syntax on the response object to query the value of any settings in the HTTP headers. For example, you could determine the -- cgit v1.3