Exemple #1
0
 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'
Exemple #2
0
 def test_initialized_invalid_dependency(self):
     processor = processors.ConstructorInjection()
     processor.container = IocContainer()
     event = sample_event('tests.watson.di.support.DoesNotExist')
     processor(event)