mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
assertRaisesRegex doesn't exist on py2 (also fuck yapf)
This deprecation is totally gonna come back and bite us when the regexp gets removed completely in never version´
This commit is contained in:
parent
7583fa9d65
commit
99ecac5649
1 changed files with 9 additions and 9 deletions
|
@ -63,17 +63,17 @@ class VideoNoteTest(BaseTest, unittest.TestCase):
|
|||
# It would also seem that it is in fact a required parameter, so the original test below
|
||||
# fails. Therefore I decided I check for the error instead - that way we'll also know
|
||||
# when telegram fixes their shit
|
||||
with self.assertRaisesRegex(telegram.error.BadRequest, r'Wrong video note length'):
|
||||
with self.assertRaisesRegexp(telegram.error.BadRequest, r'Wrong video note length'):
|
||||
message = self._bot.sendVideoNote(self._chat_id, self.videonote_file, timeout=10)
|
||||
|
||||
# videonote = message.videonote
|
||||
#
|
||||
# self.assertTrue(isinstance(videonote.file_id, str))
|
||||
# self.assertNotEqual(videonote.file_id, None)
|
||||
# self.assertEqual(videonote.duration, self.duration)
|
||||
# self.assertEqual(videonote.length, self.length)
|
||||
# self.assertEqual(videonote.thumb, self.thumb)
|
||||
# self.assertEqual(videonote.file_size, self.file_size)
|
||||
# videonote = message.videonote
|
||||
#
|
||||
# self.assertTrue(isinstance(videonote.file_id, str))
|
||||
# self.assertNotEqual(videonote.file_id, None)
|
||||
# self.assertEqual(videonote.duration, self.duration)
|
||||
# self.assertEqual(videonote.length, self.length)
|
||||
# self.assertEqual(videonote.thumb, self.thumb)
|
||||
# self.assertEqual(videonote.file_size, self.file_size)
|
||||
|
||||
@flaky(3, 1)
|
||||
@timeout(10)
|
||||
|
|
Loading…
Reference in a new issue