Fix bug in exit-count detection

This commit is contained in:
Matthias
2022-03-25 16:04:28 +01:00
parent b419d0043c
commit 1c0946833d
2 changed files with 6 additions and 7 deletions

View File

@@ -2057,10 +2057,11 @@ def test_get_best_pair_lev(fee):
@pytest.mark.usefixtures("init_persistence")
def test_get_exit_order_count(fee):
@pytest.mark.parametrize('is_short', [True, False])
def test_get_exit_order_count(fee, is_short):
create_mock_trades_usdt(fee)
trade = Trade.get_trades([Trade.pair == 'ETC/USDT']).first()
create_mock_trades(fee, is_short=is_short)
trade = Trade.get_trades([Trade.pair == 'ETC/BTC']).first()
assert trade.get_exit_order_count() == 1