def test_instance_staticmethod_wiring(self): instance = module.TestClass() service = instance.static_method() self.assertIsInstance(service, Service)
def test_class_method_wiring(self): test_class_object = module.TestClass() service = test_class_object.method() self.assertIsInstance(service, Service)
def test_class_wiring(self): test_class_object = module.TestClass() self.assertIsInstance(test_class_object.service, Service)
def test_class_wiring_context_arg(self): test_service = self.container.service() test_class_object = module.TestClass(service=test_service) self.assertIs(test_class_object.service, test_service)
def test_unwire_class_method(self): self.container.unwire() test_class_object = module.TestClass() self.assertIsInstance(test_class_object.method(), Provide)