예제 #1
0
 def test_start_with_client(self):
     arguments = MockArgumentParser()
     TelegramBotClient.TELEGRAM_CLIENT = MockTelegramBotClient(arguments)
     mock_bot = unittest.mock.Mock()
     update = []
     start(mock_bot, update)
예제 #2
0
 def test_start_with_client(self):
     arguments = MockArgumentParser()
     TelegramBotClient.TELEGRAM_CLIENT = MockTelegramBotClient(arguments)
     mock_bot = unittest.mock.Mock()
     update = []
     start(mock_bot, update)
예제 #3
0
 def test_start_no_client(self):
     TelegramBotClient.TELEGRAM_CLIENT = None
     mock_bot = unittest.mock.Mock()
     update = []
     with self.assertRaises(Exception):
         start(mock_bot, update)
예제 #4
0
 def test_start_no_client(self):
     TelegramBotClient.TELEGRAM_CLIENT = None
     mock_bot = unittest.mock.Mock()
     update = []
     with self.assertRaises(Exception):
         start(mock_bot, update)