From a36e13183884fd5766a2fca20ea2091e5529ab32 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 24 Aug 2023 07:29:50 +0200 Subject: [PATCH] Fix more conftest trades --- tests/conftest_trades.py | 1 - tests/rpc/test_rpc_apiserver.py | 2 +- tests/test_freqtradebot.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/conftest_trades.py b/tests/conftest_trades.py index 987fd9f40..056d055c2 100644 --- a/tests/conftest_trades.py +++ b/tests/conftest_trades.py @@ -103,7 +103,6 @@ def mock_trade_2(fee, is_short: bool): close_profit_abs=-0.005584127 if is_short else 0.000584127, exchange='binance', is_open=False, - open_order_id=f'dry_run_sell_{direc(is_short)}_12345', strategy='StrategyTestV3', timeframe=5, enter_tag='TEST1', diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index f9533e893..8810cfc2c 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -706,7 +706,7 @@ def test_api_delete_trade(botclient, mocker, fee, markets, is_short): assert len(trades) - 1 == len(Trade.session.scalars(select(Trade)).all()) rc = client_delete(client, f"{BASE_URI}/trades/2") assert_response(rc) - assert rc.json()['result_msg'] == 'Deleted trade 2. Closed 2 open orders.' + assert rc.json()['result_msg'] == 'Deleted trade 2. Closed 1 open orders.' assert len(trades) - 2 == len(Trade.session.scalars(select(Trade)).all()) assert stoploss_mock.call_count == 1 diff --git a/tests/test_freqtradebot.py b/tests/test_freqtradebot.py index f595788dd..958be6e24 100644 --- a/tests/test_freqtradebot.py +++ b/tests/test_freqtradebot.py @@ -5329,8 +5329,8 @@ def test_sync_wallet_dry_run(mocker, default_conf_usdt, ticker_usdt, fee, limit_ @pytest.mark.usefixtures("init_persistence") @pytest.mark.parametrize("is_short,buy_calls,sell_calls", [ - (False, 1, 2), - (True, 1, 2), + (False, 1, 1), + (True, 1, 1), ]) def test_cancel_all_open_orders(mocker, default_conf_usdt, fee, limit_order, limit_order_open, is_short, buy_calls, sell_calls):