When `request.urlconf` is set by middleware, and points to a module other
than the `ROOT_URLCONF`, the test client request will either:
a) Raise a `Resolver404` if the path resolved is not part of the
`ROOT_URLCONF` (even though the client has performed a successful
request); or
b) Resolve the path from `ROOT_URLCONF` module instead of the one set on
the `request.urlconf` attribute.
This occurs because the resolution of `response.resolver_match` only
considers the request path.
--
Ticket URL: <https://code.djangoproject.com/ticket/32470>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/14028 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32470#comment:1>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32470#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d6572ee4b05b61d8c199b95a831f35a49c775f7e" d6572ee]:
{{{
#!CommitTicketReference repository=""
revision="d6572ee4b05b61d8c199b95a831f35a49c775f7e"
Fixed #32470 -- Fixed ResolverMatch instance on test clients when
request.urlconf is set.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32470#comment:3>