From f0638df390614402fee3b4fdd265ca6bfe017642 Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Tue, 25 Jul 2017 00:23:11 +0300 Subject: [PATCH] Disable webhook unitests Telegram servers don't like the endless game of set/delete webhooks and refusing our requests. We're better of without testing it. --- tests/test_bot.py | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/test_bot.py b/tests/test_bot.py index 05c93baaf..722bb971a 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -251,27 +251,27 @@ class BotTest(BaseTest, unittest.TestCase): self.assertEqual(text, fwdmsg.text) self.assertEqual(fwdmsg.forward_from_message_id, msg.message_id) - @flaky(20, 1, _stall_retry) - @timeout(10) - def test_set_webhook_get_webhook_info(self): - url = 'https://python-telegram-bot.org/test/webhook' - max_connections = 7 - allowed_updates = ['message'] - self._bot.set_webhook(url, max_connections=7, allowed_updates=['message']) - info = self._bot.getWebhookInfo() - self._bot.delete_webhook() - self.assertEqual(url, info.url) - self.assertEqual(max_connections, info.max_connections) - self.assertListEqual(allowed_updates, info.allowed_updates) - - @flaky(20, 1, _stall_retry) - @timeout(10) - def test_delete_webhook(self): - url = 'https://python-telegram-bot.org/test/webhook' - self._bot.set_webhook(url) - self._bot.delete_webhook() - info = self._bot.getWebhookInfo() - self.assertEqual(info.url, '') + # @flaky(20, 1, _stall_retry) + # @timeout(10) + # def test_set_webhook_get_webhook_info(self): + # url = 'https://python-telegram-bot.org/test/webhook' + # max_connections = 7 + # allowed_updates = ['message'] + # self._bot.set_webhook(url, max_connections=7, allowed_updates=['message']) + # info = self._bot.getWebhookInfo() + # self._bot.delete_webhook() + # self.assertEqual(url, info.url) + # self.assertEqual(max_connections, info.max_connections) + # self.assertListEqual(allowed_updates, info.allowed_updates) + # + # @flaky(20, 1, _stall_retry) + # @timeout(10) + # def test_delete_webhook(self): + # url = 'https://python-telegram-bot.org/test/webhook' + # self._bot.set_webhook(url) + # self._bot.delete_webhook() + # info = self._bot.getWebhookInfo() + # self.assertEqual(info.url, '') @flaky(3, 1) @timeout(10)