Skip to content

Commit

Permalink
refactor: Make mock for writer compatible with 3.9.0b1 and older
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Bull <[email protected]>
  • Loading branch information
JCHacking and Dreamsorcerer authored Nov 10, 2023
1 parent e8d1f88 commit 768dbfc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions aioresponses/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ def _build_response(self, url: 'Union[URL, str]',
method=method,
headers=CIMultiDictProxy(CIMultiDict(**request_headers)),
)
if AIOHTTP_VERSION >= parse_version("3.9.0b1"):
kwargs['writer'] = AsyncMock()()
else:
kwargs['writer'] = Mock()
kwargs['writer'] = None
kwargs['continue100'] = None
kwargs['timer'] = TimerNoop()
kwargs['traces'] = []
Expand Down

0 comments on commit 768dbfc

Please sign in to comment.