Tests on Python 3.11 (#1044)

* Try to use Python 3.11

* Remove `asynctest` dependency

* Fixed aiofiles tests

* Added changelog
This commit is contained in:
Alex Root Junior 2022-10-26 22:21:04 +03:00 committed by GitHub
parent c7a85de579
commit 6db3778c6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 36 additions and 88 deletions

View file

@ -1,15 +1,10 @@
from typing import Awaitable
from unittest.mock import AsyncMock, patch
import pytest
from aiogram.filters import Filter
try:
from asynctest import CoroutineMock, patch
except ImportError:
from unittest.mock import AsyncMock as CoroutineMock # type: ignore
from unittest.mock import patch
pytestmark = pytest.mark.asyncio
@ -26,7 +21,7 @@ class TestBaseFilter:
with patch(
"tests.test_filters.test_base.MyFilter.__call__",
new_callable=CoroutineMock,
new_callable=AsyncMock,
) as mocked_call:
call = my_filter(event="test")
await call