From 78741e304e740c11d0aef9136657a7cd8802d43d Mon Sep 17 00:00:00 2001 From: Suren Khorenyan Date: Sat, 30 Dec 2023 22:47:01 +0300 Subject: [PATCH] Bot API 7.0 tests for dispatcher handle update chat_boost --- tests/test_dispatcher/test_dispatcher.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 1eb2f822..be0c68dc 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -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(