def test_search_strategy(): default_location = os.path.join( os.path.dirname(os.path.realpath(__file__)), '..', '..', 'strategy') assert isinstance( StrategyResolver._search_strategy(default_location, 'DefaultStrategy'), IStrategy) assert StrategyResolver._search_strategy(default_location, 'NotFoundStrategy') is None
def test_search_strategy(): default_config = {} default_location = path.join(path.dirname(path.realpath(__file__)), '..', '..', 'strategy') assert isinstance( StrategyResolver._search_strategy(default_location, config=default_config, strategy_name='DefaultStrategy'), IStrategy) assert StrategyResolver._search_strategy( default_location, config=default_config, strategy_name='NotFoundStrategy') is None