ftx.fill_leverage_brackets test

This commit is contained in:
Sam Germain 2021-09-03 19:56:53 -06:00
parent 9d398924c6
commit 01263663be
2 changed files with 7 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class Exchange:
} }
_ft_has: Dict = {} _ft_has: Dict = {}
_leverage_brackets: Dict _leverage_brackets: Dict = {}
def __init__(self, config: Dict[str, Any], validate: bool = True) -> None: def __init__(self, config: Dict[str, Any], validate: bool = True) -> None:
""" """

View File

@ -195,6 +195,12 @@ def test_get_order_id(mocker, default_conf):
assert exchange.get_order_id_conditional(order) == '1111' 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', [ @pytest.mark.parametrize('pair,nominal_value,max_lev', [
("ADA/BTC", 0.0, 20.0), ("ADA/BTC", 0.0, 20.0),
("BTC/EUR", 100.0, 20.0), ("BTC/EUR", 100.0, 20.0),