This commit is contained in:
hroff-1902 2020-02-15 06:54:18 +03:00
parent e8c0a0bcd3
commit ddea4b9300

View File

@ -43,8 +43,10 @@ def test_search_all_strategies_with_failed():
strategies = StrategyResolver.search_all_objects(directory, enum_failed=True) strategies = StrategyResolver.search_all_objects(directory, enum_failed=True)
assert isinstance(strategies, list) assert isinstance(strategies, list)
assert len(strategies) == 4 assert len(strategies) == 4
assert isinstance(strategies[0], dict) # with enum_failed=True search_all_objects() shall find 3 good strategies
assert strategies[0]['class'] is None # 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): def test_load_strategy(default_conf, result):