mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fixed typehints and tests
This commit is contained in:
parent
4ba07c0815
commit
053e0bbbcc
2 changed files with 25 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from unittest.mock import MagicMock, patch
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -212,3 +212,9 @@ class TestCallbackAnswerMiddleware:
|
|||
await middleware(handler, event, {})
|
||||
|
||||
assert stack == expected_stack
|
||||
|
||||
async def test_invalid_event_type(self):
|
||||
middleware = CallbackAnswerMiddleware()
|
||||
handler = AsyncMock()
|
||||
await middleware(handler, None, {})
|
||||
handler.assert_awaited()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue