1717#
1818# You should have received a copy of the GNU General Public License
1919# along with this program. If not, see [http://www.gnu.org/licenses/].
20-
2120"""This module contains a object that represents Tests for Telegram Bot"""
2221
2322import sys
@@ -55,8 +54,9 @@ def testGetMe(self):
5554 @flaky (3 , 1 )
5655 @timeout (10 )
5756 def testSendMessage (self ):
58- message = self ._bot .sendMessage (chat_id = self ._chat_id ,
59- text = 'Моё судно на воздушной подушке полно угрей' )
57+ message = self ._bot .sendMessage (
58+ chat_id = self ._chat_id ,
59+ text = 'Моё судно на воздушной подушке полно угрей' )
6060
6161 self .assertTrue (self .is_json (message .to_json ()))
6262 self .assertEqual (message .text ,
@@ -66,9 +66,10 @@ def testSendMessage(self):
6666 @flaky (3 , 1 )
6767 @timeout (10 )
6868 def testSilentSendMessage (self ):
69- message = self ._bot .sendMessage (chat_id = self ._chat_id ,
70- text = 'Моё судно на воздушной подушке полно угрей' ,
71- disable_notification = True )
69+ message = self ._bot .sendMessage (
70+ chat_id = self ._chat_id ,
71+ text = 'Моё судно на воздушной подушке полно угрей' ,
72+ disable_notification = True )
7273
7374 self .assertTrue (self .is_json (message .to_json ()))
7475 self .assertEqual (message .text ,
@@ -129,8 +130,9 @@ def testResendPhoto(self):
129130 chat_id = self ._chat_id )
130131
131132 self .assertTrue (self .is_json (message .to_json ()))
132- self .assertEqual (message .photo [0 ].file_id ,
133- 'AgADAQADyKcxGx8j9Qdp6d-gpUsw4Gja1i8ABEVJsVqQk8LfJ3wAAgI' )
133+ self .assertEqual (
134+ message .photo [0 ].file_id ,
135+ 'AgADAQADyKcxGx8j9Qdp6d-gpUsw4Gja1i8ABEVJsVqQk8LfJ3wAAgI' )
134136
135137 @flaky (3 , 1 )
136138 @timeout (10 )
@@ -167,8 +169,7 @@ def testSendGIFURLPhoto(self):
167169 def testSendBufferedReaderPhoto (self ):
168170 photo = open ('tests/data/telegram.png' , 'rb' )
169171 br_photo = io .BufferedReader (io .BytesIO (photo .read ()))
170- message = self ._bot .sendPhoto (photo = br_photo ,
171- chat_id = self ._chat_id )
172+ message = self ._bot .sendPhoto (photo = br_photo , chat_id = self ._chat_id )
172173
173174 self .assertTrue (self .is_json (message .to_json ()))
174175 self .assertEqual (message .photo [0 ].file_size , 1451 )
0 commit comments