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:
Jacob Bom 2017-05-21 14:10:55 +02:00
parent 7583fa9d65
commit 99ecac5649

View file

@ -63,7 +63,7 @@ class VideoNoteTest(BaseTest, unittest.TestCase):
# It would also seem that it is in fact a required parameter, so the original test below # 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 # fails. Therefore I decided I check for the error instead - that way we'll also know
# when telegram fixes their shit # 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) message = self._bot.sendVideoNote(self._chat_id, self.videonote_file, timeout=10)
# videonote = message.videonote # videonote = message.videonote