mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
test: add initial sleep test
This commit is contained in:
parent
94030903ec
commit
ef139707f3
1 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,12 @@ class TestChatActionSender:
|
|||
await sender._wait(1)
|
||||
assert time.monotonic() - start < 1
|
||||
|
||||
async def test_initial_sleep(self, bot: Bot):
|
||||
initial_sleep = 1.0
|
||||
start = time.monotonic()
|
||||
async with ChatActionSender.typing(bot=bot, chat_id=42, initial_sleep=initial_sleep):
|
||||
assert time.monotonic() - start >= initial_sleep
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"action",
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue