@@ -34,17 +34,24 @@ class VideoNoteTest(BaseTest, unittest.TestCase):
3434 """This object represents Tests for Telegram VideoNote."""
3535
3636 def setUp (self ):
37- self .videonote_file = open ('tests/data/telegram .mp4' , 'rb' )
37+ self .videonote_file = open ('tests/data/telegram2 .mp4' , 'rb' )
3838 self .videonote_file_id = 'DQADAQADBwAD5VIIRYemhHpbPmIQAg'
39- self .duration = 5
39+ self .duration = 3
4040 self .length = 1 # No bloody clue what this does
4141 self .thumb = telegram .PhotoSize .de_json ({
42+ 'file_id' : 'AAQBABMsDPcvAAQX7NUVpGq-s34OAAIC' ,
43+ 'width' : 90 ,
44+ 'file_size' : 3043 ,
45+ 'height' : 90
46+ }, self ._bot )
47+ self .thumb_resend = telegram .PhotoSize .de_json ({
4248 'file_id' : 'AAQBABOMsecvAAQqqoY1Pee_MqcyAAIC' ,
4349 'width' : 51 ,
4450 'file_size' : 645 ,
4551 'height' : 90
4652 }, self ._bot )
47- self .file_size = 326534
53+
54+ self .file_size = 132084
4855
4956 self .json_dict = {
5057 'file_id' : self .videonote_file_id ,
@@ -95,17 +102,16 @@ def test_send_videonote_resend(self):
95102 message = self ._bot .sendVideoNote (
96103 chat_id = self ._chat_id ,
97104 video_note = self .videonote_file_id ,
98- timeout = 10 ,
99- duration = self .duration ,
100- length = self .length )
105+ timeout = 10
106+ )
101107
102108 videonote = message .video_note
103109
104110 self .assertEqual (videonote .file_id , self .videonote_file_id )
105111 # self.assertEqual(videonote.length, self.length)
106112 self .assertIsInstance (videonote .length , numbers .Number )
107- self .assertEqual (videonote .duration , self . duration )
108- self .assertEqual (videonote .thumb , self .thumb )
113+ self .assertEqual (videonote .duration , 5 )
114+ self .assertEqual (videonote .thumb , self .thumb_resend )
109115 # Telegram doesn't send file_size for resends?
110116 # self.assertEqual(videonote.file_size, self.file_size)
111117
0 commit comments