We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d0befb commit ce68b25Copy full SHA for ce68b25
1 file changed
tests/client/test_non2xx_status.py
@@ -45,7 +45,7 @@ async def test_401_produces_error_response(self):
45
mock_response.headers = {"content-type": "text/plain"}
46
mock_response.aread = AsyncMock(return_value=b"Unauthorized")
47
48
- # Use async context manager mock
+ # Use MagicMock with async __aenter__/__aexit__
49
mock_stream_ctx = MagicMock()
50
mock_stream_ctx.__aenter__ = AsyncMock(return_value=mock_response)
51
mock_stream_ctx.__aexit__ = AsyncMock(return_value=False)
0 commit comments