def test_inject_value_list(self): processor = processors.ConstructorInjection() processor.container = IocContainer() event = sample_event('tests.watson.di.support.SampleDependencyAware') event.target['init'] = ['test'] instance = processor(event) assert instance.first_arg == 'test'
def test_initialized_invalid_dependency(self): processor = processors.ConstructorInjection() processor.container = IocContainer() event = sample_event('tests.watson.di.support.DoesNotExist') processor(event)