total_open_trades_stake should support no-db mode
This commit is contained in:
@@ -1039,14 +1039,18 @@ def test_fee_updated(fee):
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("init_persistence")
|
||||
def test_total_open_trades_stakes(fee):
|
||||
@pytest.mark.parametrize('use_db', [True, False])
|
||||
def test_total_open_trades_stakes(fee, use_db):
|
||||
|
||||
Trade.use_db = use_db
|
||||
res = Trade.total_open_trades_stakes()
|
||||
assert res == 0
|
||||
create_mock_trades(fee)
|
||||
create_mock_trades(fee, use_db)
|
||||
res = Trade.total_open_trades_stakes()
|
||||
assert res == 0.004
|
||||
|
||||
Trade.use_db = True
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("init_persistence")
|
||||
def test_get_overall_performance(fee):
|
||||
|
Reference in New Issue
Block a user