From d3a0ab8096bcd119ca3fd57c4880a8648783ee4d Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 5 May 2020 07:12:49 +0200 Subject: [PATCH] Change mock-status to be open when testing unfilled... --- tests/test_freqtradebot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_freqtradebot.py b/tests/test_freqtradebot.py index f2b2f6b5c..7a30e9015 100644 --- a/tests/test_freqtradebot.py +++ b/tests/test_freqtradebot.py @@ -2314,6 +2314,7 @@ def test_handle_timedout_limit_buy(mocker, caplog, default_conf, limit_buy_order trade = MagicMock() trade.pair = 'LTC/ETH' limit_buy_order['filled'] = 0 + limit_buy_order['status'] = 'open' assert freqtrade.handle_timedout_limit_buy(trade, limit_buy_order) assert cancel_order_mock.call_count == 1 @@ -2367,8 +2368,9 @@ def test_handle_timedout_limit_buy_corder_empty(mocker, default_conf, limit_buy_ Trade.session = MagicMock() trade = MagicMock() trade.pair = 'LTC/ETH' - limit_buy_order['remaining'] = limit_buy_order['amount'] limit_buy_order['filled'] = 0.0 + limit_buy_order['status'] = 'open' + assert freqtrade.handle_timedout_limit_buy(trade, limit_buy_order) assert cancel_order_mock.call_count == 1