@@ -74,7 +74,7 @@ def test_expected_values(self):
74
74
75
75
@flaky (3 , 1 )
76
76
@timeout (10 )
77
- def test_sendphotoo_all_args (self ):
77
+ def test_sendphoto_all_args (self ):
78
78
message = self ._bot .sendPhoto (self ._chat_id , self .photo_file , caption = self .caption , disable_notification = False )
79
79
thumb , photo = message .photo
80
80
@@ -115,6 +115,38 @@ def test_send_photo_url_jpg_file(self):
115
115
self .assertEqual (photo .height , self .photo .height )
116
116
self .assertEqual (photo .file_size , self .photo .file_size )
117
117
118
+ @flaky (3 , 1 )
119
+ @timeout (10 )
120
+ def test_send_photo_url_png_file (self ):
121
+ message = self ._bot .sendPhoto (
122
+ photo = 'http://dummyimage.com/600x400/000/fff.png&text=telegram' , chat_id = self ._chat_id )
123
+
124
+ thumb , photo = message .photo
125
+
126
+ self .assertIsInstance (thumb , telegram .PhotoSize )
127
+ self .assertIsInstance (thumb .file_id , str )
128
+ self .assertNotEqual (thumb .file_id , '' )
129
+
130
+ self .assertIsInstance (photo , telegram .PhotoSize )
131
+ self .assertIsInstance (photo .file_id , str )
132
+ self .assertNotEqual (photo .file_id , '' )
133
+
134
+ @flaky (3 , 1 )
135
+ @timeout (10 )
136
+ def test_send_photo_url_gif_file (self ):
137
+ message = self ._bot .sendPhoto (
138
+ photo = 'http://dummyimage.com/600x400/000/fff.gif&text=telegram' , chat_id = self ._chat_id )
139
+
140
+ thumb , photo = message .photo
141
+
142
+ self .assertIsInstance (thumb , telegram .PhotoSize )
143
+ self .assertIsInstance (thumb .file_id , str )
144
+ self .assertNotEqual (thumb .file_id , '' )
145
+
146
+ self .assertIsInstance (photo , telegram .PhotoSize )
147
+ self .assertIsInstance (photo .file_id , str )
148
+ self .assertNotEqual (photo .file_id , '' )
149
+
118
150
@flaky (3 , 1 )
119
151
@timeout (10 )
120
152
def test_send_photo_bytesio_jpg_file (self ):
@@ -141,6 +173,20 @@ def test_send_photo_bytesio_jpg_file(self):
141
173
self .assertEqual (photo .height , 1080 )
142
174
self .assertEqual (photo .file_size , 30907 )
143
175
176
+ @flaky (3 , 1 )
177
+ @timeout (10 )
178
+ def test_silent_send_photo (self ):
179
+ message = self ._bot .sendPhoto (photo = self .photo_file , chat_id = self ._chat_id , disable_notification = True )
180
+ thumb , photo = message .photo
181
+
182
+ self .assertIsInstance (thumb , telegram .PhotoSize )
183
+ self .assertIsInstance (thumb .file_id , str )
184
+ self .assertNotEqual (thumb .file_id , '' )
185
+
186
+ self .assertIsInstance (photo , telegram .PhotoSize )
187
+ self .assertIsInstance (photo .file_id , str )
188
+ self .assertNotEqual (photo .file_id , '' )
189
+
144
190
@flaky (3 , 1 )
145
191
@timeout (10 )
146
192
def test_send_photo_resend (self ):
0 commit comments