mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
Revert switch_inline_query #232
This commit is contained in:
parent
e56c6dfab6
commit
a8255e4f51
3 changed files with 6 additions and 2 deletions
|
@ -52,10 +52,12 @@ class InlineKeyboardButton(TelegramObject):
|
|||
# Optionals
|
||||
self.url = kwargs.get('url')
|
||||
self.callback_data = kwargs.get('callback_data')
|
||||
self.switch_inline_query = kwargs.get('switch_inline_query', '')
|
||||
self.switch_inline_query = kwargs.get('switch_inline_query')
|
||||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
data = super(InlineKeyboardButton, InlineKeyboardButton).de_json(data)
|
||||
|
||||
if not data:
|
||||
return None
|
||||
|
||||
|
|
|
@ -62,6 +62,8 @@ class InlineQuery(TelegramObject):
|
|||
Returns:
|
||||
telegram.InlineQuery:
|
||||
"""
|
||||
data = super(InlineQuery, InlineQuery).de_json(data)
|
||||
|
||||
if not data:
|
||||
return None
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class InlineQueryTest(BaseTest, unittest.TestCase):
|
|||
inlinequery = telegram.InlineQuery.de_json(self.json_dict).to_dict()
|
||||
|
||||
self.assertTrue(self.is_dict(inlinequery))
|
||||
# self.assertDictEqual(inlinequery, self.json_dict)
|
||||
self.assertDictEqual(inlinequery, self.json_dict)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue