From 34d7d530a13f73c6cd2d1d82a753b5362352c903 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 26 May 2024 10:40:27 +0200 Subject: [PATCH] chore(tests): Filled orders should have an average. --- tests/exchange_online/test_ccxt_compat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/exchange_online/test_ccxt_compat.py b/tests/exchange_online/test_ccxt_compat.py index 6eb9f0023..49fbfc60d 100644 --- a/tests/exchange_online/test_ccxt_compat.py +++ b/tests/exchange_online/test_ccxt_compat.py @@ -76,7 +76,8 @@ class TestCCXTExchange: assert isinstance(po["timestamp"], int) assert isinstance(po["price"], float) assert po["price"] == 15.5 - if po["average"] is not None: + if po["status"] == "closed": + # Filled orders should have average assigned. assert isinstance(po["average"], float) assert po["average"] == 15.5 assert po["symbol"] == pair