Style fixes

This commit is contained in:
Dmitry Anfimov 2022-12-13 22:28:18 +06:00
parent eb2125d631
commit 2c28f7ee4b
3 changed files with 14 additions and 4 deletions

View file

@ -37,7 +37,11 @@ class MockedSession(BaseSession):
return response.result # type: ignore
async def stream_content(
self, url: str, timeout: int, chunk_size: int, raise_for_status: bool,
self,
url: str,
timeout: int,
chunk_size: int,
raise_for_status: bool,
) -> AsyncGenerator[bytes, None]: # pragma: no cover
yield b""

View file

@ -209,10 +209,13 @@ class TestAiohttpSession:
async def test_stream_content_404(self, aresponses: ResponsesMockServer):
aresponses.add(
aresponses.ANY, aresponses.ANY, "get", aresponses.Response(
aresponses.ANY,
aresponses.ANY,
"get",
aresponses.Response(
status=404,
body=b"File not found",
)
),
)
session = AiohttpSession()
stream = session.stream_content(