fix test_send

This commit is contained in:
felinae98 2022-02-13 20:45:09 +08:00
parent 6a8b2e2d15
commit 5217a2db9b
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610
2 changed files with 2 additions and 3 deletions

View File

@ -25,9 +25,6 @@ async def do_send_msgs():
if time.time() - LAST_SEND_TIME < 1.5:
return
if QUEUE:
import ipdb
ipdb.set_trace()
bot, user, user_type, msg, retry_time = QUEUE.pop(0)
try:
await _do_send(bot, user, user_type, msg)

View File

@ -46,4 +46,6 @@ async def test_send_queue(app: App):
"send_group_msg", {"group_id": "1233", "message": "msg"}, True
)
LAST_SEND_TIME = 0
await asyncio.sleep(2)
await do_send_msgs()
assert ctx.wait_list.empty()