From ddea4b9300f12fcd099f0e4f5724bf290ec17881 Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Sat, 15 Feb 2020 06:54:18 +0300 Subject: [PATCH] Fix test --- tests/strategy/test_strategy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/strategy/test_strategy.py b/tests/strategy/test_strategy.py index 3d3f0f424..379260599 100644 --- a/tests/strategy/test_strategy.py +++ b/tests/strategy/test_strategy.py @@ -43,8 +43,10 @@ def test_search_all_strategies_with_failed(): strategies = StrategyResolver.search_all_objects(directory, enum_failed=True) assert isinstance(strategies, list) assert len(strategies) == 4 - assert isinstance(strategies[0], dict) - assert strategies[0]['class'] is None + # with enum_failed=True search_all_objects() shall find 3 good strategies + # and 1 which fails to load + assert len([x for x in strategies if x['class'] is not None]) == 3 + assert len([x for x in strategies if x['class'] is None]) == 1 def test_load_strategy(default_conf, result):