In #1794, we use MagicMock to mock out http requests, we should consider using the industry standard aioresponses library
Sounds good! actually there is a similar library for this which I like, it mocks the request call and you don't mock your code at all. I would suggest we use it, but @freddyaboulton's approach works as well!
The library is aioresponses and there is a pytest plugin .
Originally posted by @farukozderim in #1794 (comment)
In #1794, we use MagicMock to mock out http requests, we should consider using the industry standard aioresponses library
Sounds good! actually there is a similar library for this which I like, it mocks the request call and you don't mock your code at all. I would suggest we use it, but @freddyaboulton's approach works as well!
The library is aioresponses and there is a pytest plugin .
Originally posted by @farukozderim in #1794 (comment)