Skip to content

Commit

Permalink
fix: aiohttp 3.9 _writer can't await
Browse files Browse the repository at this point in the history
  • Loading branch information
JCHacking authored Nov 9, 2023
1 parent b444d72 commit e8d1f88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aioresponses/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def _build_response(self, url: 'Union[URL, str]',
method=method,
headers=CIMultiDictProxy(CIMultiDict(**request_headers)),
)
kwargs['writer'] = Mock()
if AIOHTTP_VERSION >= parse_version("3.9.0b1"):
kwargs['writer'] = AsyncMock()()
else:
kwargs['writer'] = Mock()
kwargs['continue100'] = None
kwargs['timer'] = TimerNoop()
kwargs['traces'] = []
Expand Down

0 comments on commit e8d1f88

Please sign in to comment.