mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
assertIsNone(...) to assertTrue(None is ...)
This commit is contained in:
parent
29cdfe671e
commit
83d2ca3aa7
1 changed files with 9 additions and 9 deletions
|
@ -115,7 +115,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
bot.send_messages = 1
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
|
||||
def test_addTelegramMessageHandlerMultipleMessages(self):
|
||||
|
@ -146,7 +146,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
bot.send_messages = 1
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_addRemoveTelegramCommandHandler(self):
|
||||
print('Testing add/removeTelegramCommandHandler')
|
||||
|
@ -165,7 +165,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
bot.send_messages = 1
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_addRemoveUnknownTelegramCommandHandler(self):
|
||||
print('Testing add/removeUnknownTelegramCommandHandler')
|
||||
|
@ -184,7 +184,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
bot.send_messages = 1
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_addRemoveStringRegexHandler(self):
|
||||
print('Testing add/removeStringRegexHandler')
|
||||
|
@ -203,7 +203,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
queue.put('Test3')
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_addRemoveStringCommandHandler(self):
|
||||
print('Testing add/removeStringCommandHandler')
|
||||
|
@ -224,7 +224,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
queue.put('/test3')
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_addRemoveUnknownStringCommandHandler(self):
|
||||
print('Testing add/removeUnknownStringCommandHandler')
|
||||
|
@ -244,7 +244,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
bot.send_messages = 1
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_addRemoveErrorHandler(self):
|
||||
print('Testing add/removeErrorHandler')
|
||||
|
@ -264,7 +264,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
queue.put(error)
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_errorInHandler(self):
|
||||
print('Testing error in Handler')
|
||||
|
@ -308,7 +308,7 @@ class BotEventHandlerTest(BaseTest, unittest.TestCase):
|
|||
|
||||
queue.put(payload)
|
||||
sleep(.1)
|
||||
self.assertIsNone(self.received_message)
|
||||
self.assertTrue(None is self.received_message)
|
||||
|
||||
def test_runAsync(self):
|
||||
print('Testing @run_async')
|
||||
|
|
Loading…
Reference in a new issue