Test case to disable base64 strategies via API

This commit is contained in:
Matthias 2022-09-27 20:34:44 +02:00
parent 6c491ee02e
commit e668bf7138
1 changed files with 9 additions and 0 deletions

View File

@ -1477,6 +1477,10 @@ def test_api_strategy(botclient):
rc = client_get(client, f"{BASE_URI}/strategy/NoStrat")
assert_response(rc, 404)
# Disallow base64 strategies
rc = client_get(client, f"{BASE_URI}/strategy/xx:cHJpbnQoImhlbGxvIHdvcmxkIik=")
assert_response(rc, 500)
def test_list_available_pairs(botclient):
ftbot, client = botclient
@ -1650,6 +1654,11 @@ def test_api_backtesting(botclient, mocker, fee, caplog, tmpdir):
assert not result['running']
assert result['status_msg'] == 'Backtest reset'
# Disallow base64 strategies
data['strategy'] = "xx:cHJpbnQoImhlbGxvIHdvcmxkIik="
rc = client_post(client, f"{BASE_URI}/backtest", data=json.dumps(data))
assert_response(rc, 500)
def test_api_backtest_history(botclient, mocker, testdatadir):
ftbot, client = botclient