From 286bd0c40baf056e01bc90b62712cbac5cf5dae4 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Wed, 20 Jul 2022 15:00:02 +0200 Subject: [PATCH] follow string for adding a strat to tests/strategy/strats --- tests/rpc/test_rpc_apiserver.py | 3 ++- tests/strategy/test_strategy_loading.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 57c08f48e..86fe0bf03 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -1403,7 +1403,8 @@ def test_api_strategies(botclient): 'StrategyTestV2', 'StrategyTestV3', 'StrategyTestV3Analysis', - 'StrategyTestV3Futures' + 'StrategyTestV3Futures', + 'freqai_test_strat' ]} diff --git a/tests/strategy/test_strategy_loading.py b/tests/strategy/test_strategy_loading.py index bdfcf3211..aaad26e5b 100644 --- a/tests/strategy/test_strategy_loading.py +++ b/tests/strategy/test_strategy_loading.py @@ -34,7 +34,7 @@ def test_search_all_strategies_no_failed(): directory = Path(__file__).parent / "strats" strategies = StrategyResolver.search_all_objects(directory, enum_failed=False) assert isinstance(strategies, list) - assert len(strategies) == 7 + assert len(strategies) == 8 assert isinstance(strategies[0], dict) @@ -42,10 +42,10 @@ def test_search_all_strategies_with_failed(): directory = Path(__file__).parent / "strats" strategies = StrategyResolver.search_all_objects(directory, enum_failed=True) assert isinstance(strategies, list) - assert len(strategies) == 8 + assert len(strategies) == 9 # with enum_failed=True search_all_objects() shall find 2 good strategies # and 1 which fails to load - assert len([x for x in strategies if x['class'] is not None]) == 7 + assert len([x for x in strategies if x['class'] is not None]) == 8 assert len([x for x in strategies if x['class'] is None]) == 1