File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2020"""This module contains a object that represents Tests for Telegram Bot"""
2121
2222import io
23+ import re
2324from datetime import datetime
2425import sys
2526
@@ -211,10 +212,11 @@ def testInvalidSrvResp(self):
211212 @flaky (3 , 1 )
212213 @timeout (10 )
213214 def testLeaveChat (self ):
214- with self .assertRaisesRegexp (telegram .error .BadRequest , 'Chat not found' ):
215+ regex = re .compile ('chat not found' , re .IGNORECASE )
216+ with self .assertRaisesRegexp (telegram .error .BadRequest , regex ):
215217 chat = self ._bot .leaveChat (- 123456 )
216218
217- with self .assertRaisesRegexp (telegram .error .NetworkError , 'Chat not found' ):
219+ with self .assertRaisesRegexp (telegram .error .NetworkError , regex ):
218220 chat = self ._bot .leaveChat (- 123456 )
219221
220222 @flaky (3 , 1 )
You can’t perform that action at this time.
0 commit comments