fix test which was failing locally for some reason

This commit is contained in:
Harshil 2021-04-21 14:28:09 +05:30
parent 4da7656659
commit a54770947f
No known key found for this signature in database
GPG key ID: 5AEE5B73890746C5

View file

@ -88,12 +88,12 @@ class TestInlineKeyboardMarkup:
):
if reply_markup is not None:
if isinstance(reply_markup, ReplyMarkup):
data['reply_markup'] = reply_markup.to_json()
data['reply_markup'] = reply_markup.to_dict()
else:
data['reply_markup'] = reply_markup
assert bool('"switch_inline_query": ""' in data['reply_markup'])
assert bool('"switch_inline_query_current_chat": ""' in data['reply_markup'])
assert bool("'switch_inline_query': ''" in str(data['reply_markup']))
assert bool("'switch_inline_query_current_chat': ''" in str(data['reply_markup']))
inline_keyboard_markup.inline_keyboard[0][0].callback_data = None
inline_keyboard_markup.inline_keyboard[0][0].switch_inline_query = ''