Merge pull request #7923 from freqtrade/freqai_backtest
Freqai backtest
This commit is contained in:
@@ -1488,6 +1488,44 @@ def test_api_strategy(botclient):
|
||||
assert_response(rc, 500)
|
||||
|
||||
|
||||
def test_api_freqaimodels(botclient, tmpdir, mocker):
|
||||
ftbot, client = botclient
|
||||
ftbot.config['user_data_dir'] = Path(tmpdir)
|
||||
mocker.patch(
|
||||
"freqtrade.resolvers.freqaimodel_resolver.FreqaiModelResolver.search_all_objects",
|
||||
return_value=[
|
||||
{'name': 'LightGBMClassifier'},
|
||||
{'name': 'LightGBMClassifierMultiTarget'},
|
||||
{'name': 'LightGBMRegressor'},
|
||||
{'name': 'LightGBMRegressorMultiTarget'},
|
||||
{'name': 'ReinforcementLearner'},
|
||||
{'name': 'ReinforcementLearner_multiproc'},
|
||||
{'name': 'XGBoostClassifier'},
|
||||
{'name': 'XGBoostRFClassifier'},
|
||||
{'name': 'XGBoostRFRegressor'},
|
||||
{'name': 'XGBoostRegressor'},
|
||||
{'name': 'XGBoostRegressorMultiTarget'},
|
||||
])
|
||||
|
||||
rc = client_get(client, f"{BASE_URI}/freqaimodels")
|
||||
|
||||
assert_response(rc)
|
||||
|
||||
assert rc.json() == {'freqaimodels': [
|
||||
'LightGBMClassifier',
|
||||
'LightGBMClassifierMultiTarget',
|
||||
'LightGBMRegressor',
|
||||
'LightGBMRegressorMultiTarget',
|
||||
'ReinforcementLearner',
|
||||
'ReinforcementLearner_multiproc',
|
||||
'XGBoostClassifier',
|
||||
'XGBoostRFClassifier',
|
||||
'XGBoostRFRegressor',
|
||||
'XGBoostRegressor',
|
||||
'XGBoostRegressorMultiTarget'
|
||||
]}
|
||||
|
||||
|
||||
def test_list_available_pairs(botclient):
|
||||
ftbot, client = botclient
|
||||
|
||||
|
Reference in New Issue
Block a user