Skip to content

Commit a7d8ef4

Browse files
committed
Feat: add sleep between requests
1 parent 32c25f6 commit a7d8ef4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import asyncio
12
import os
3+
import time
24
from typing import AsyncIterator
35

46
import pytest
@@ -18,6 +20,9 @@ def kik() -> DefaultClient:
1820
"KIK_PASSWORD and KIK_USERNAME environment variables must be set"
1921
)
2022

23+
# take some breath to avoid getting blocked by the server
24+
time.sleep(1)
25+
2126
return DefaultClient(
2227
username=username,
2328
password=password,
@@ -42,4 +47,7 @@ async def akik() -> AsyncIterator[AsyncClient]:
4247
)
4348

4449
async with c as kik:
50+
# take some breath to avoid getting blocked by the server
51+
await asyncio.sleep(1)
52+
4553
yield kik

0 commit comments

Comments
 (0)