mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-08 19:34:12 +01:00
Trying to isolate the problem.
This commit is contained in:
parent
6390b7fd9b
commit
fe06708d34
2 changed files with 25 additions and 25 deletions
|
@ -47,11 +47,11 @@ class Venue(TelegramObject):
|
|||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
data = super(Venue, Venue).de_json(data)
|
||||
|
||||
if not data:
|
||||
return None
|
||||
|
||||
data = super(Venue, Venue).de_json(data)
|
||||
|
||||
data['location'] = Location.de_json(data.get('location'))
|
||||
|
||||
return Venue(**data)
|
||||
|
|
|
@ -66,29 +66,29 @@ class InlineQueryResultVenueTest(BaseTest, unittest.TestCase):
|
|||
'reply_markup': self.reply_markup.to_dict(),
|
||||
}
|
||||
|
||||
# def test_venue_de_json(self):
|
||||
# venue = telegram.InlineQueryResultVenue.de_json(self.json_dict)
|
||||
#
|
||||
# self.assertEqual(venue.id, self.id)
|
||||
# self.assertEqual(venue.type, self.type)
|
||||
# self.assertEqual(venue.latitude, self.latitude)
|
||||
# self.assertEqual(venue.longitude, self.longitude)
|
||||
# self.assertEqual(venue.title, self.title)
|
||||
# self.assertEqual(venue.address, self.address)
|
||||
# self.assertEqual(venue.foursquare_id, self.foursquare_id)
|
||||
# self.assertEqual(venue.thumb_url, self.thumb_url)
|
||||
# self.assertEqual(venue.thumb_width, self.thumb_width)
|
||||
# self.assertEqual(venue.thumb_height, self.thumb_height)
|
||||
# self.assertDictEqual(venue.input_message_content.to_dict(),
|
||||
# self.input_message_content.to_dict())
|
||||
# self.assertDictEqual(venue.reply_markup.to_dict(),
|
||||
# self.reply_markup.to_dict())
|
||||
#
|
||||
# def test_venue_to_json(self):
|
||||
# venue = telegram.InlineQueryResultVenue.de_json(self.json_dict)
|
||||
#
|
||||
# self.assertTrue(self.is_json(venue.to_json()))
|
||||
#
|
||||
def test_venue_de_json(self):
|
||||
venue = telegram.InlineQueryResultVenue.de_json(self.json_dict)
|
||||
|
||||
self.assertEqual(venue.id, self.id)
|
||||
self.assertEqual(venue.type, self.type)
|
||||
self.assertEqual(venue.latitude, self.latitude)
|
||||
self.assertEqual(venue.longitude, self.longitude)
|
||||
self.assertEqual(venue.title, self.title)
|
||||
self.assertEqual(venue.address, self.address)
|
||||
self.assertEqual(venue.foursquare_id, self.foursquare_id)
|
||||
self.assertEqual(venue.thumb_url, self.thumb_url)
|
||||
self.assertEqual(venue.thumb_width, self.thumb_width)
|
||||
self.assertEqual(venue.thumb_height, self.thumb_height)
|
||||
self.assertDictEqual(venue.input_message_content.to_dict(),
|
||||
self.input_message_content.to_dict())
|
||||
self.assertDictEqual(venue.reply_markup.to_dict(),
|
||||
self.reply_markup.to_dict())
|
||||
|
||||
def test_venue_to_json(self):
|
||||
venue = telegram.InlineQueryResultVenue.de_json(self.json_dict)
|
||||
|
||||
self.assertTrue(self.is_json(venue.to_json()))
|
||||
|
||||
# def test_venue_to_dict(self):
|
||||
# venue = \
|
||||
# telegram.InlineQueryResultVenue.de_json(
|
||||
|
|
Loading…
Reference in a new issue