mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2026-02-03 11:20:56 +03:00
reformat tests
This commit is contained in:
18
app/tests/bot/test_bot.py
Normal file
18
app/tests/bot/test_bot.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import pytest
|
||||
from aiogram import Bot, types
|
||||
from app.tests.conftest import FakeTelegram
|
||||
from app.tests.data.factories import UserFactory
|
||||
|
||||
pytestmark = [
|
||||
pytest.mark.asyncio,
|
||||
]
|
||||
|
||||
|
||||
async def test_parse_site(bot: Bot) -> None:
|
||||
tg_user = UserFactory().as_dict()
|
||||
user = types.User(**tg_user)
|
||||
|
||||
async with FakeTelegram(message_data=tg_user):
|
||||
result = await bot.me
|
||||
|
||||
assert result == user
|
||||
Reference in New Issue
Block a user