Test also backtest result list

This commit is contained in:
Matthias
2023-08-03 06:42:15 +02:00
parent 23a2b95994
commit 6d6111864e

View File

@@ -80,6 +80,7 @@ def client_post(client: TestClient, url, data={}):
'content-type': 'application/json'
})
def client_patch(client: TestClient, url, data={}):
return client.patch(url,
@@ -89,6 +90,7 @@ def client_patch(client: TestClient, url, data={}):
'content-type': 'application/json'
})
def client_get(client: TestClient, url):
# Add fake Origin to ensure CORS kicks in
return client.get(url, headers={'Authorization': _basic_auth_str(_TEST_USER, _TEST_PASS),
@@ -2019,6 +2021,7 @@ def test_api_backtest_history(botclient, mocker, testdatadir):
assert len(result) == 3
fn = result[0]['filename']
assert fn == "backtest-result_multistrat"
assert result[0]['notes'] == ''
strategy = result[0]['strategy']
rc = client_get(client, f"{BASE_URI}/backtest/history/result?filename={fn}&strategy={strategy}")
assert_response(rc)