Skip to content

Conversation

mschoettle
Copy link
Contributor

Updating to the latest version(s) of django-stubs from 1.10.1 reveals errors such as:

Argument 1 to "assertContains" has incompatible type "_MonkeyPatchedWSGIResponse"; expected "HttpResponse" [arg-type]

django-stubs expects a HttpResponseBase instead of HttpResponse (see: https://github.com/typeddjango/django-stubs/blob/0381fdb0227f0db96a584d8e916ae6d8b3d025a3/django-stubs/test/testcases.pyi#L102)

This PR changes the signatures to be in line with what django-stubs defines.

@mschoettle mschoettle changed the title Fix assert function signatures that expect response Fix assert function signatures that expect HTTP response Nov 8, 2022
@adamchainz
Copy link
Member

Great, thanks!

@adamchainz adamchainz merged commit 42b7db2 into pytest-dev:master Nov 8, 2022
@mschoettle mschoettle deleted the fix-assert-with-httpresponse-signatures branch November 8, 2022 21:22
@mschoettle
Copy link
Contributor Author

@adamchainz Any chance a new version could be released soon that includes this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants