Added cost to limit_sell_order_usdt_open, fixing some tests

This commit is contained in:
Sam Germain 2021-10-09 15:50:18 -06:00
parent 85e86ec09d
commit 9a6ffff5eb
2 changed files with 7 additions and 3 deletions

View File

@ -2309,6 +2309,7 @@ def limit_sell_order_usdt_open():
'timestamp': arrow.utcnow().int_timestamp,
'price': 2.20,
'amount': 30.0,
'cost': 66.0,
'filled': 0.0,
'remaining': 30.0,
'status': 'open'

View File

@ -1927,13 +1927,16 @@ def test_update_trade_state_sell(
assert order.status == 'closed'
@pytest.mark.parametrize('is_short', [False, True])
@pytest.mark.parametrize('is_short', [
False,
True
])
def test_handle_trade(
default_conf_usdt, limit_order_open, limit_order, fee, mocker, is_short
) -> None:
open_order = limit_order_open[exit_side(is_short)]
enter_order = limit_order[exit_side(is_short)]
exit_order = limit_order[enter_side(is_short)]
enter_order = limit_order[enter_side(is_short)]
exit_order = limit_order[exit_side(is_short)]
patch_RPCManager(mocker)
patch_exchange(mocker)
mocker.patch.multiple(