chore: replace fixture loop with event_loop

This commit is contained in:
Oleg A 2023-09-18 14:53:05 +03:00
parent c229cf8c7b
commit 52ca61b388
No known key found for this signature in database
GPG key ID: 5FE046817A9657C5

View file

@ -13,9 +13,9 @@ from tests.mocked_bot import MockedBot
class TestChatActionSender:
async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop):
async def test_wait(self, bot: Bot, event_loop: asyncio.BaseEventLoop):
sender = ChatActionSender.typing(bot=bot, chat_id=42)
loop.call_soon(sender._close_event.set)
event_loop.call_soon(sender._close_event.set)
start = time.monotonic()
await sender._wait(1)
assert time.monotonic() - start < 1