Fixed typehints and tests

This commit is contained in:
Alex Root Junior 2023-01-08 02:29:14 +02:00
parent 4ba07c0815
commit 053e0bbbcc
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
2 changed files with 25 additions and 13 deletions

View file

@ -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()