mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Correct test for antiflood function
This commit is contained in:
parent
9050f4af1f
commit
7fe8d27686
@ -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