1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1410 from barbax7/patch-1

Correct test for antiflood function
This commit is contained in:
Badiboy 2022-01-10 18:36:15 +03:00 committed by GitHub
commit fdbc0e6a61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,12 +464,12 @@ class TestTeleBot:
assert new_msg.message_id
def test_antiflood(self):
text = "Flooding"
text = "Testing antiflood function"
tb = telebot.TeleBot(TOKEN)
i = -1
for i in range(0,100):
for i in range(0,200):
util.antiflood(tb.send_message, CHAT_ID, text)
assert i
assert i == 199
@staticmethod
def create_text_message(text):