Bot API 7.0 tests for dispatcher handle update chat_boost

This commit is contained in:
Suren Khorenyan 2023-12-30 22:47:01 +03:00
parent 4451c4d344
commit 78741e304e

View file

@ -19,6 +19,9 @@ from aiogram.types import (
CallbackQuery,
Chat,
ChatJoinRequest,
ChatBoost,
ChatBoostSourceGiveaway,
ChatBoostUpdated,
ChatMemberMember,
ChatMemberUpdated,
ChosenInlineResult,
@ -486,6 +489,25 @@ class TestDispatcher:
True,
False,
),
pytest.param(
"chat_boost",
Update(
update_id=42,
chat_boost=ChatBoostUpdated(
chat=Chat(id=-42, type="channel"),
boost=ChatBoost(
boost_id="qwerty",
add_date=datetime.datetime.now(),
expiration_date=datetime.datetime.now(),
source=ChatBoostSourceGiveaway(
giveaway_message_id=77,
),
),
),
),
True,
False,
),
],
)
async def test_listen_update(