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
Encountered on Ubuntu 22.04.
aiohttp version 3.8.4
aioresponses version 0.7.4
I encountered this when running python tests with pytest.
Consider the following file test_method_case_bug.py (note that I am supplying a lowercase parameter "get" to the session.request):
If run with the command pytest test_method_case_bug.py, you will see that the assertion mock_aioresponse.assert_any_call('http://localhost') fails because it is expecting the method to be uppercase GET not lowercase get.
Encountered on Ubuntu 22.04.
aiohttp version 3.8.4
aioresponses version 0.7.4
I encountered this when running python tests with pytest.
Consider the following file
test_method_case_bug.py
(note that I am supplying a lowercase parameter "get" to thesession.request
):If run with the command
pytest test_method_case_bug.py
, you will see that the assertionmock_aioresponse.assert_any_call('http://localhost')
fails because it is expecting the method to be uppercaseGET
not lowercaseget
.I suggest assigning the
self.requests
keys with anupper()
call.i.e. change https://github.com/pnuckowski/aioresponses/blob/master/aioresponses/core.py#L516 to be
key = (method.upper(), url)
The text was updated successfully, but these errors were encountered: