You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromdjango.testimportClientc=Client()
response=c.get("/admin/", follow=True)
response.redirect_chain# "_MonkeyPatchedWSGIResponse" has no attribute "redirect_chain"
How is that should be
If the follow=True argument was passed, the response object must have the redirect_chain attribute, otherwise it must not.
Quote from docs: If you set follow to True the client will follow any redirects and a redirect_chain attribute will be set in the response object containing tuples of the intermediate urls and status codes.
The type of this attribute is List[Tuple[str, int]].
System information
OS: Arch Linux
python version: 3.10.5
django version: 4.1
mypy version: 0.961 and 0.971
django-stubs version: 1.12.0
django-stubs-ext version: 0.5.0
The text was updated successfully, but these errors were encountered:
Bug report
What's wrong
How is that should be
If the
follow=True
argument was passed, the response object must have theredirect_chain
attribute, otherwise it must not.Quote from docs:
If you set follow to True the client will follow any redirects and a redirect_chain attribute will be set in the response object containing tuples of the intermediate urls and status codes.
The type of this attribute is
List[Tuple[str, int]]
.System information
python
version: 3.10.5django
version: 4.1mypy
version: 0.961 and 0.971django-stubs
version: 1.12.0django-stubs-ext
version: 0.5.0The text was updated successfully, but these errors were encountered: