Revert switch_inline_query #232

This commit is contained in:
Leandro Toledo 2016-04-21 11:42:02 -03:00
parent e56c6dfab6
commit a8255e4f51
3 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -62,6 +62,8 @@ class InlineQuery(TelegramObject):
Returns:
telegram.InlineQuery:
"""
data = super(InlineQuery, InlineQuery).de_json(data)
if not data:
return None

View file

@ -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__':