mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
* Added base code and make code improvements * Auto-exclude coverage for `if TYPE_CHECKING:` * Fixed current coverage * Cover I18n module * Update pipeline * Fixed annotations * Added docs * Move exceptions * Added tests for KeyboardBuilder and initial docs * Remove help generator (removed from sources tree, requires rewrite) * Added patch-notes #698, #699, #700, #701, #702, #703
14 lines
365 B
Python
14 lines
365 B
Python
import pytest
|
|
|
|
from aiogram.dispatcher.middlewares.user_context import UserContextMiddleware
|
|
|
|
|
|
async def next_handler(*args, **kwargs):
|
|
pass
|
|
|
|
|
|
class TestUserContextMiddleware:
|
|
@pytest.mark.asyncio
|
|
async def test_unexpected_event_type(self):
|
|
with pytest.raises(RuntimeError):
|
|
await UserContextMiddleware()(next_handler, object(), {})
|