From 8d74233aa51d53bf48d5d3561d372b4c29700776 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 3 Sep 2021 19:56:53 -0600 Subject: [PATCH] ftx.fill_leverage_brackets test --- freqtrade/exchange/exchange.py | 2 +- tests/exchange/test_ftx.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 7c983e58e..6689731d8 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -75,7 +75,7 @@ class Exchange: } _ft_has: Dict = {} - _leverage_brackets: Dict + _leverage_brackets: Dict = {} def __init__(self, config: Dict[str, Any], validate: bool = True) -> None: """ diff --git a/tests/exchange/test_ftx.py b/tests/exchange/test_ftx.py index 8b44b6069..0f3870a7f 100644 --- a/tests/exchange/test_ftx.py +++ b/tests/exchange/test_ftx.py @@ -195,6 +195,12 @@ def test_get_order_id(mocker, default_conf): assert exchange.get_order_id_conditional(order) == '1111' +def test_fill_leverage_brackets(default_conf, mocker): + exchange = get_patched_exchange(mocker, default_conf, id="ftx") + exchange.fill_leverage_brackets() + assert bool(exchange._leverage_brackets) is False + + @pytest.mark.parametrize('pair,nominal_value,max_lev', [ ("ADA/BTC", 0.0, 20.0), ("BTC/EUR", 100.0, 20.0),