Skip to content

Commit

Permalink
Feat: add sleep between requests
Browse files Browse the repository at this point in the history
  • Loading branch information
foarsitter committed Jun 21, 2023
1 parent 32c25f6 commit a7d8ef4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import asyncio
import os
import time
from typing import AsyncIterator

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

# take some breath to avoid getting blocked by the server
time.sleep(1)

return DefaultClient(
username=username,
password=password,
Expand All @@ -42,4 +47,7 @@ async def akik() -> AsyncIterator[AsyncClient]:
)

async with c as kik:
# take some breath to avoid getting blocked by the server
await asyncio.sleep(1)

yield kik

0 comments on commit a7d8ef4

Please sign in to comment.