X Tutup
Skip to content

Commit f0638df

Browse files
committed
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.
1 parent 2aa31c6 commit f0638df

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

tests/test_bot.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -251,27 +251,27 @@ def test_forward_channel_message(self):
251251
self.assertEqual(text, fwdmsg.text)
252252
self.assertEqual(fwdmsg.forward_from_message_id, msg.message_id)
253253

254-
@flaky(20, 1, _stall_retry)
255-
@timeout(10)
256-
def test_set_webhook_get_webhook_info(self):
257-
url = 'https://python-telegram-bot.org/test/webhook'
258-
max_connections = 7
259-
allowed_updates = ['message']
260-
self._bot.set_webhook(url, max_connections=7, allowed_updates=['message'])
261-
info = self._bot.getWebhookInfo()
262-
self._bot.delete_webhook()
263-
self.assertEqual(url, info.url)
264-
self.assertEqual(max_connections, info.max_connections)
265-
self.assertListEqual(allowed_updates, info.allowed_updates)
266-
267-
@flaky(20, 1, _stall_retry)
268-
@timeout(10)
269-
def test_delete_webhook(self):
270-
url = 'https://python-telegram-bot.org/test/webhook'
271-
self._bot.set_webhook(url)
272-
self._bot.delete_webhook()
273-
info = self._bot.getWebhookInfo()
274-
self.assertEqual(info.url, '')
254+
# @flaky(20, 1, _stall_retry)
255+
# @timeout(10)
256+
# def test_set_webhook_get_webhook_info(self):
257+
# url = 'https://python-telegram-bot.org/test/webhook'
258+
# max_connections = 7
259+
# allowed_updates = ['message']
260+
# self._bot.set_webhook(url, max_connections=7, allowed_updates=['message'])
261+
# info = self._bot.getWebhookInfo()
262+
# self._bot.delete_webhook()
263+
# self.assertEqual(url, info.url)
264+
# self.assertEqual(max_connections, info.max_connections)
265+
# self.assertListEqual(allowed_updates, info.allowed_updates)
266+
#
267+
# @flaky(20, 1, _stall_retry)
268+
# @timeout(10)
269+
# def test_delete_webhook(self):
270+
# url = 'https://python-telegram-bot.org/test/webhook'
271+
# self._bot.set_webhook(url)
272+
# self._bot.delete_webhook()
273+
# info = self._bot.getWebhookInfo()
274+
# self.assertEqual(info.url, '')
275275

276276
@flaky(3, 1)
277277
@timeout(10)

0 commit comments

Comments
 (0)
X Tutup