fix: recover tests (#1004)

- applied pytest_async;
- fixed requirements;
- minor typos;
This commit is contained in:
Oleg A 2022-09-18 15:32:42 +03:00 committed by GitHub
parent 96ebee26e4
commit e065285857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 49 additions and 46 deletions

View file

@ -1,23 +1,21 @@
from asyncio import BaseEventLoop
import pytest
import pytest_asyncio
from aiogram import Bot, types
from . import FakeTelegram, TOKEN
from . import FakeTelegram
pytestmark = pytest.mark.asyncio
@pytest.fixture()
async def message(bot: Bot):
@pytest_asyncio.fixture(name="message")
async def message_fixture(bot: Bot):
"""
Message fixture
:param bot: Telegram bot fixture
:type bot: Bot
:param event_loop: asyncio event loop
:type event_loop: BaseEventLoop
"""
from .types.dataset import MESSAGE
msg = types.Message(**MESSAGE)
async with FakeTelegram(message_data=MESSAGE):