Update parse_order test

This commit is contained in:
Matthias 2023-01-31 20:59:55 +01:00
parent 8a0fabed0e
commit 9bb376296d

View File

@ -323,16 +323,19 @@ class TestCCXTExchange():
po = exch._api.parse_order(order) po = exch._api.parse_order(order)
assert isinstance(po['id'], str) assert isinstance(po['id'], str)
assert po['id'] is not None assert po['id'] is not None
if len(order.keys()) > 1: if len(order.keys()) < 5:
assert po['timestamp'] == 1674493798550 # Kucoin case
assert isinstance(po['datetime'], str) assert po['status'] == 'closed'
assert isinstance(po['timestamp'], int) continue
assert isinstance(po['price'], float) assert po['timestamp'] == 1674493798550
assert po['price'] == 15.5 assert isinstance(po['datetime'], str)
assert po['symbol'] == 'SOL/USDT' assert isinstance(po['timestamp'], int)
assert isinstance(po['amount'], float) assert isinstance(po['price'], float)
assert po['amount'] == 1.1 assert po['price'] == 15.5
assert isinstance(po['status'], str) assert po['symbol'] == 'SOL/USDT'
assert isinstance(po['amount'], float)
assert po['amount'] == 1.1
assert isinstance(po['status'], str)
else: else:
pytest.skip(f"No sample order available for exchange {exchange_name}") pytest.skip(f"No sample order available for exchange {exchange_name}")