mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-01 08:56:27 +01:00
Renaming methods for InlineKeyboardButton
This commit is contained in:
parent
e905f310c4
commit
7b13adb34b
1 changed files with 13 additions and 13 deletions
|
@ -44,29 +44,29 @@ class InlineKeyboardButtonTest(BaseTest, unittest.TestCase):
|
|||
'switch_inline_query': self.switch_inline_query
|
||||
}
|
||||
|
||||
def test_inline_keyboard_button_markup_de_json(self):
|
||||
inline_keyboard_button_markup = telegram.InlineKeyboardButton.de_json(
|
||||
def test_inline_keyboard_button_de_json(self):
|
||||
inline_keyboard_button = telegram.InlineKeyboardButton.de_json(
|
||||
self.json_dict)
|
||||
|
||||
self.assertEqual(inline_keyboard_button_markup.text, self.text)
|
||||
self.assertEqual(inline_keyboard_button_markup.url, self.url)
|
||||
self.assertEqual(inline_keyboard_button_markup.callback_data,
|
||||
self.assertEqual(inline_keyboard_button.text, self.text)
|
||||
self.assertEqual(inline_keyboard_button.url, self.url)
|
||||
self.assertEqual(inline_keyboard_button.callback_data,
|
||||
self.callback_data)
|
||||
self.assertEqual(inline_keyboard_button_markup.switch_inline_query,
|
||||
self.assertEqual(inline_keyboard_button.switch_inline_query,
|
||||
self.switch_inline_query)
|
||||
|
||||
def test_inline_keyboard_button_markup_to_json(self):
|
||||
inline_keyboard_button_markup = telegram.InlineKeyboardButton.de_json(
|
||||
def test_inline_keyboard_button_to_json(self):
|
||||
inline_keyboard_button = telegram.InlineKeyboardButton.de_json(
|
||||
self.json_dict)
|
||||
|
||||
self.assertTrue(self.is_json(inline_keyboard_button_markup.to_json()))
|
||||
self.assertTrue(self.is_json(inline_keyboard_button.to_json()))
|
||||
|
||||
def test_inline_keyboard_button_markup_to_dict(self):
|
||||
inline_keyboard_button_markup = telegram.InlineKeyboardButton.de_json(
|
||||
def test_inline_keyboard_button_to_dict(self):
|
||||
inline_keyboard_button = telegram.InlineKeyboardButton.de_json(
|
||||
self.json_dict).to_dict()
|
||||
|
||||
self.assertTrue(self.is_dict(inline_keyboard_button_markup))
|
||||
self.assertDictEqual(self.json_dict, inline_keyboard_button_markup)
|
||||
self.assertTrue(self.is_dict(inline_keyboard_button))
|
||||
self.assertDictEqual(self.json_dict, inline_keyboard_button)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue