mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
15 lines
365 B
Python
15 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(), {})
|