Add get_open_trade_count() to simplify getting open trade count.
This commit is contained in:
@@ -473,8 +473,6 @@ def test_create_trade_no_signal(default_conf_usdt, fee, mocker) -> None:
|
||||
freqtrade = FreqtradeBot(default_conf_usdt)
|
||||
patch_get_signal(freqtrade, enter_long=False, exit_long=False)
|
||||
|
||||
Trade.query = MagicMock()
|
||||
Trade.query.filter = MagicMock()
|
||||
assert not freqtrade.create_trade('ETH/USDT')
|
||||
|
||||
|
||||
|
@@ -1689,6 +1689,7 @@ def test_get_open(fee, is_short, use_db):
|
||||
|
||||
create_mock_trades(fee, is_short, use_db)
|
||||
assert len(Trade.get_open_trades()) == 4
|
||||
assert Trade.get_open_trade_count() == 4
|
||||
|
||||
Trade.use_db = True
|
||||
|
||||
@@ -1701,6 +1702,7 @@ def test_get_open_lev(fee, use_db):
|
||||
|
||||
create_mock_trades_with_leverage(fee, use_db)
|
||||
assert len(Trade.get_open_trades()) == 5
|
||||
assert Trade.get_open_trade_count() == 5
|
||||
|
||||
Trade.use_db = True
|
||||
|
||||
|
Reference in New Issue
Block a user