chore: Fix misuse of asyncio.sleep in test

This commit is contained in:
Matthias 2024-07-05 09:11:58 +02:00
parent 36a44575c7
commit 8b50973411

View File

@ -56,11 +56,11 @@ async def test_exchangews_ohlcv(mocker):
assert exchange_ws._klines_scheduled == set()
exchange_ws.schedule_ohlcv("ETH/BTC", "1m", CandleType.SPOT)
asyncio.sleep(0.5)
await asyncio.sleep(0.5)
assert exchange_ws._klines_watching == {("ETH/BTC", "1m", CandleType.SPOT)}
assert exchange_ws._klines_scheduled == {("ETH/BTC", "1m", CandleType.SPOT)}
asyncio.sleep(0.1)
await asyncio.sleep(0.1)
assert ccxt_object.watch_ohlcv.call_count == 1
except Exception as e:
print(e)