From 9a6ffff5eb7a72f459bbdff12281c139368b2fc6 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sat, 9 Oct 2021 15:50:18 -0600 Subject: [PATCH] Added cost to limit_sell_order_usdt_open, fixing some tests --- tests/conftest.py | 1 + tests/test_freqtradebot.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a0d6148db..b97e0dfad 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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' diff --git a/tests/test_freqtradebot.py b/tests/test_freqtradebot.py index 4405c788a..1f14be306 100644 --- a/tests/test_freqtradebot.py +++ b/tests/test_freqtradebot.py @@ -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(