def test_start_with_client(self): arguments = MockArgumentParser() TelegramBotClient.TELEGRAM_CLIENT = MockTelegramBotClient(arguments) mock_bot = unittest.mock.Mock() update = [] start(mock_bot, update)
def test_start_no_client(self): TelegramBotClient.TELEGRAM_CLIENT = None mock_bot = unittest.mock.Mock() update = [] with self.assertRaises(Exception): start(mock_bot, update)