From acb00cd0728efe1e2bee29fa3ed2ae2b7173935b Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 18 Aug 2021 06:25:52 +0200 Subject: [PATCH] Use realistic threshold for "get_fee" test --- tests/exchange/test_ccxt_compat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index dce10da84..ffca9ec81 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -142,8 +142,8 @@ class TestCCXTExchange(): def test_ccxt_get_fee(self, exchange): exchange, exchangename = exchange pair = EXCHANGES[exchangename]['pair'] - - assert 0 < exchange.get_fee(pair, 'limit', 'buy') < 1 - assert 0 < exchange.get_fee(pair, 'limit', 'sell') < 1 - assert 0 < exchange.get_fee(pair, 'market', 'buy') < 1 - assert 0 < exchange.get_fee(pair, 'market', 'sell') < 1 + threshold = 0.01 + assert 0 < exchange.get_fee(pair, 'limit', 'buy') < threshold + assert 0 < exchange.get_fee(pair, 'limit', 'sell') < threshold + assert 0 < exchange.get_fee(pair, 'market', 'buy') < threshold + assert 0 < exchange.get_fee(pair, 'market', 'sell') < threshold