Update order_parse online test

This commit is contained in:
Matthias
2023-09-18 19:09:12 +02:00
parent a009816ac4
commit 56b9c250ba

View File

@@ -58,8 +58,10 @@ class TestCCXTExchange:
def test_ccxt_order_parse(self, exchange: EXCHANGE_FIXTURE_TYPE):
exch, exchange_name = exchange
if orders := EXCHANGES[exchange_name].get('sample_order'):
pair = 'SOL/USDT'
for order in orders:
po = exch._api.parse_order(order)
market = exch._api.markets[pair]
po = exch._api.parse_order(order, market)
assert isinstance(po['id'], str)
assert po['id'] is not None
if len(order.keys()) < 5:
@@ -74,7 +76,7 @@ class TestCCXTExchange:
if po['average'] is not None:
assert isinstance(po['average'], float)
assert po['average'] == 15.5
assert po['symbol'] == 'SOL/USDT'
assert po['symbol'] == pair
assert isinstance(po['amount'], float)
assert po['amount'] == 1.1
assert isinstance(po['status'], str)