def setUp(self): ioc.teardown() self.provisions = load_container(DEPS_FILE) self.provisions.setup(ioc.provide) self.const_scalar_int = ioc.instance('constant.scalar.int') self.const_scalar_str = ioc.instance('constant.scalar.str') self.const_scalar_bool = ioc.instance('constant.scalar.boolean') self.const_composite_list = ioc.instance('constant.composite.list') self.const_composite_dict = ioc.instance('constant.composite.dict')
def setUp(self): ioc.teardown() self.constant = ioc.constant('test.constant') self.function = ioc.function( 'test.function', args=self.function_args, kwargs=self.function_kwargs, mode=ioc.KW_OVERRIDE ) self.str_dep = ioc.constant('test.str') ioc.provide('test.constant', self.constant_val) ioc.provide('test.str', self.str_val) ioc.provide('test.function', self.dep_function) ioc.load_container(DEPS_FILE) ioc.setup(ignore_missing=True)