mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: recover tests (#1004)
- applied pytest_async; - fixed requirements; - minor typos;
This commit is contained in:
parent
96ebee26e4
commit
e065285857
11 changed files with 49 additions and 46 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue