X Tutup
Skip to content

Commit 04feeef

Browse files
committed
Update test cases
Needs proper animation file_id and size. Also assertEqual can't test if two objects have the same data, so we just check the file_id instead.
1 parent 8dc10fc commit 04feeef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def testSendGame(self):
167167

168168
self.assertTrue(self.is_json(message.to_json()))
169169
self.assertEqual(message.game.description, 'This is a test game for python-telegram-bot.')
170-
self.assertEqual(message.game.animation.file_id, 'BQADBAADFQEAAny4rAVRC_XtgXzEvAI')
171-
self.assertEqual(message.game.photo[0].file_size, 849)
170+
self.assertEqual(message.game.animation.file_id, 'BQADAQADKwIAAvjAuQABozciVqhFDO0C')
171+
self.assertEqual(message.game.photo[0].file_size, 851)
172172

173173
@flaky(3, 1)
174174
@timeout(10)
@@ -292,7 +292,7 @@ def test_set_game_score(self):
292292

293293
self.assertTrue(self.is_json(game.to_json()))
294294
self.assertEqual(message.game.description, game.game.description)
295-
self.assertEqual(message.game.animation, game.game.animation)
295+
self.assertEqual(message.game.animation.file_id, game.game.animation.file_id)
296296
self.assertEqual(message.game.photo[0].file_size, game.game.photo[0].file_size)
297297
self.assertNotEqual(message.game.text, game.game.text)
298298

0 commit comments

Comments
 (0)
X Tutup