Test case to disable base64 strategies via API
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user