mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
feat: resolve ChatMember
This commit is contained in:
parent
153090457a
commit
ce481a9ebf
4 changed files with 34 additions and 5 deletions
|
|
@ -427,7 +427,7 @@ async def test_get_chat_administrators(bot: Bot):
|
|||
""" getChatAdministrators method test """
|
||||
from .types.dataset import CHAT, CHAT_MEMBER
|
||||
chat = types.Chat(**CHAT)
|
||||
member = types.ChatMember(**CHAT_MEMBER)
|
||||
member = types.ChatMember.resolve(**CHAT_MEMBER)
|
||||
|
||||
async with FakeTelegram(message_data=[CHAT_MEMBER, CHAT_MEMBER]):
|
||||
result = await bot.get_chat_administrators(chat_id=chat.id)
|
||||
|
|
@ -450,7 +450,7 @@ async def test_get_chat_member(bot: Bot):
|
|||
""" getChatMember method test """
|
||||
from .types.dataset import CHAT, CHAT_MEMBER
|
||||
chat = types.Chat(**CHAT)
|
||||
member = types.ChatMember(**CHAT_MEMBER)
|
||||
member = types.ChatMember.resolve(**CHAT_MEMBER)
|
||||
|
||||
async with FakeTelegram(message_data=CHAT_MEMBER):
|
||||
result = await bot.get_chat_member(chat_id=chat.id, user_id=member.user.id)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from aiogram import types
|
||||
from .dataset import CHAT_MEMBER
|
||||
|
||||
chat_member = types.ChatMember(**CHAT_MEMBER)
|
||||
chat_member = types.ChatMember.resolve(**CHAT_MEMBER)
|
||||
|
||||
|
||||
def test_export():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue