Improve test by having multistrat.meta file available
This commit is contained in:
@@ -1597,8 +1597,9 @@ def test_api_backtest_history(botclient, mocker, testdatadir):
|
||||
rc = client_get(client, f"{BASE_URI}/backtest/history")
|
||||
assert_response(rc)
|
||||
result = rc.json()
|
||||
assert len(result) == 1
|
||||
assert len(result) == 3
|
||||
fn = result[0]['filename']
|
||||
assert fn == "backtest-result_multistrat.json"
|
||||
strategy = result[0]['strategy']
|
||||
rc = client_get(client, f"{BASE_URI}/backtest/history/result?filename={fn}&strategy={strategy}")
|
||||
assert_response(rc)
|
||||
@@ -1607,7 +1608,9 @@ def test_api_backtest_history(botclient, mocker, testdatadir):
|
||||
assert result2['status'] == 'ended'
|
||||
assert not result2['running']
|
||||
assert result2['progress'] == 1
|
||||
assert result2['backtest_result']['strategy'][CURRENT_TEST_STRATEGY]
|
||||
# Only one strategy loaded - even though we use multiresult
|
||||
assert len(result2['backtest_result']['strategy']) == 1
|
||||
assert result2['backtest_result']['strategy'][strategy]
|
||||
|
||||
|
||||
def test_health(botclient):
|
||||
|
Reference in New Issue
Block a user