From 66ecc6996dd7bf5fa7561ee1ff9d2985bf4422e3 Mon Sep 17 00:00:00 2001 From: Gabben <43146729+gabbhack@users.noreply.github.com> Date: Sun, 17 May 2020 17:01:06 +0500 Subject: [PATCH] Improving test_callback_query --- tests/test_api/test_types/test_callback_query.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_api/test_types/test_callback_query.py b/tests/test_api/test_types/test_callback_query.py index f76c9be9..792cca68 100644 --- a/tests/test_api/test_types/test_callback_query.py +++ b/tests/test_api/test_types/test_callback_query.py @@ -8,7 +8,12 @@ class TestCallbackQuery: id="id", from_user=User(id=42, is_bot=False, first_name="name"), chat_instance="chat" ) - api_method = callback_query.answer() + kwargs = dict(text="foo", show_alert=True, url="https://foo.bar/", cache_time=123) + + api_method = callback_query.answer(**kwargs) assert isinstance(api_method, AnswerCallbackQuery) assert api_method.callback_query_id == callback_query.id + + for key, value in kwargs.items(): + assert getattr(api_method, key) == value