mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Reformat code
This commit is contained in:
parent
a98e5871d2
commit
3ee8d903da
4 changed files with 60 additions and 40 deletions
|
|
@ -248,13 +248,16 @@ class TestAiohttpSession:
|
|||
async with AiohttpSession() as session:
|
||||
assert isinstance(session, AsyncContextManager)
|
||||
|
||||
with patch(
|
||||
"aiogram.client.session.aiohttp.AiohttpSession.create_session",
|
||||
new_callable=AsyncMock,
|
||||
) as mocked_create_session, patch(
|
||||
"aiogram.client.session.aiohttp.AiohttpSession.close",
|
||||
new_callable=AsyncMock,
|
||||
) as mocked_close:
|
||||
with (
|
||||
patch(
|
||||
"aiogram.client.session.aiohttp.AiohttpSession.create_session",
|
||||
new_callable=AsyncMock,
|
||||
) as mocked_create_session,
|
||||
patch(
|
||||
"aiogram.client.session.aiohttp.AiohttpSession.close",
|
||||
new_callable=AsyncMock,
|
||||
) as mocked_close,
|
||||
):
|
||||
async with session as ctx:
|
||||
assert session == ctx
|
||||
mocked_close.assert_awaited_once()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue