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:
commit
fdbc0e6a61
@ -464,12 +464,12 @@ class TestTeleBot:
|
|||||||
assert new_msg.message_id
|
assert new_msg.message_id
|
||||||
|
|
||||||
def test_antiflood(self):
|
def test_antiflood(self):
|
||||||
text = "Flooding"
|
text = "Testing antiflood function"
|
||||||
tb = telebot.TeleBot(TOKEN)
|
tb = telebot.TeleBot(TOKEN)
|
||||||
i = -1
|
i = -1
|
||||||
for i in range(0,100):
|
for i in range(0,200):
|
||||||
util.antiflood(tb.send_message, CHAT_ID, text)
|
util.antiflood(tb.send_message, CHAT_ID, text)
|
||||||
assert i
|
assert i == 199
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_text_message(text):
|
def create_text_message(text):
|
||||||
|
Loading…
Reference in New Issue
Block a user