Skip to content

Commit

Permalink
Remove false test statements
Browse files Browse the repository at this point in the history
a trade is ONLY closed on `.close()` - which will only happen once the last order has been filled.
  • Loading branch information
xmatthias committed Sep 30, 2022
1 parent 2d2ff2f commit 561600e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/test_freqtradebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2673,7 +2673,6 @@ def test_manage_open_orders_exit_usercustom(
open_trade_usdt.open_date = arrow.utcnow().shift(hours=-5).datetime
open_trade_usdt.close_date = arrow.utcnow().shift(minutes=-601).datetime
open_trade_usdt.close_profit_abs = 0.001
open_trade_usdt.is_open = False

Trade.query.session.add(open_trade_usdt)
Trade.commit()
Expand All @@ -2687,7 +2686,6 @@ def test_manage_open_orders_exit_usercustom(
freqtrade.manage_open_orders()
assert cancel_order_mock.call_count == 0
assert rpc_mock.call_count == 1
assert open_trade_usdt.is_open is False
assert freqtrade.strategy.check_exit_timeout.call_count == 1
assert freqtrade.strategy.check_entry_timeout.call_count == 0

Expand All @@ -2697,7 +2695,6 @@ def test_manage_open_orders_exit_usercustom(
freqtrade.manage_open_orders()
assert cancel_order_mock.call_count == 0
assert rpc_mock.call_count == 1
assert open_trade_usdt.is_open is False
assert freqtrade.strategy.check_exit_timeout.call_count == 1
assert freqtrade.strategy.check_entry_timeout.call_count == 0

Expand All @@ -2707,7 +2704,6 @@ def test_manage_open_orders_exit_usercustom(
freqtrade.manage_open_orders()
assert cancel_order_mock.call_count == 1
assert rpc_mock.call_count == 2
assert open_trade_usdt.is_open is True
assert freqtrade.strategy.check_exit_timeout.call_count == 1
assert freqtrade.strategy.check_entry_timeout.call_count == 0

Expand Down Expand Up @@ -2755,7 +2751,6 @@ def test_manage_open_orders_exit(
open_trade_usdt.open_date = arrow.utcnow().shift(hours=-5).datetime
open_trade_usdt.close_date = arrow.utcnow().shift(minutes=-601).datetime
open_trade_usdt.close_profit_abs = 0.001
open_trade_usdt.is_open = False
open_trade_usdt.is_short = is_short

Trade.query.session.add(open_trade_usdt)
Expand Down Expand Up @@ -2796,7 +2791,6 @@ def test_check_handle_cancelled_exit(

open_trade_usdt.open_date = arrow.utcnow().shift(hours=-5).datetime
open_trade_usdt.close_date = arrow.utcnow().shift(minutes=-601).datetime
open_trade_usdt.is_open = False
open_trade_usdt.is_short = is_short

Trade.query.session.add(open_trade_usdt)
Expand Down

0 comments on commit 561600e

Please sign in to comment.