def testSetAttrToPrimitiveMethod(self): """ Test set attr created with to_primitive param, but calling one method """ bifacewattr = BasicInterfaceWithAttributes() bifacewattr.my_attr_to_primitive_method = ANOTHER_RESPONSE self.assertTrue(isinstance(bifacewattr.my_attr_produces_method, AnotherReturnType), "attr must return class passed to to_primitive")
def testSetAttr(self): """ Test set simple attr """ bifacewattr = BasicInterfaceWithAttributes() bifacewattr.my_attr = ANOTHER_RESPONSE self.assertEquals(bifacewattr.my_attr, ANOTHER_RESPONSE)
def testSetAttrProduces(self): """ Test set attr created with produces param, produces class """ bifacewattr = BasicInterfaceWithAttributes() bifacewattr.my_attr_produces = ANOTHER_RESPONSE self.assertEquals(bifacewattr.my_attr, ANOTHER_RESPONSE)
def testSetAttrProducesMethod(self): """ Test set attr created with produces param, but calling method """ bifacewattr = BasicInterfaceWithAttributes() bifacewattr.my_attr_produces_method = ANOTHER_RESPONSE
def testSetAttrIface(self): """ Test set attr created with to_primitive param """ bifacewattr = BasicInterfaceWithAttributes() bifacewattr.my_attr_iface = ANOTHER_RESPONSE