Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_MonkeyPatchedResponse missing attribute wsgi_request. #389

Open
PedroPerpetua opened this issue Apr 3, 2023 · 0 comments
Open

_MonkeyPatchedResponse missing attribute wsgi_request. #389

PedroPerpetua opened this issue Apr 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@PedroPerpetua
Copy link

Bug report

What's wrong

The response comming from a request made with rest_framework.test.APIClient has an attribute wsgi_request of type WSGIRequest. Currently, if used, mypy will throw out an error: error: "_MonkeyPatchedResponse" has no attribute "wsgi_request".

How is that should be

No error should be thrown by mypy (if we type: ignore it, it works just fine in runtime).

System information

  • OS: Linux
  • python version: 3.11
  • django version: 4.1.7
  • mypy version: 1.1.1
  • django-stubs version: 1.16.0
@PedroPerpetua PedroPerpetua added the bug Something isn't working label Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant