Exemplo n.º 1
0
 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")
Exemplo n.º 2
0
 def testSetAttr(self):
     """
     Test set simple attr
     """
     bifacewattr = BasicInterfaceWithAttributes()
     bifacewattr.my_attr = ANOTHER_RESPONSE
     self.assertEquals(bifacewattr.my_attr, ANOTHER_RESPONSE)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 def testSetAttrProducesMethod(self):
     """
     Test set attr created with produces param, but calling method
     """
     bifacewattr = BasicInterfaceWithAttributes() 
     bifacewattr.my_attr_produces_method = ANOTHER_RESPONSE
Exemplo n.º 5
0
 def testSetAttrIface(self):
     """
     Test set attr created with to_primitive param
     """
     bifacewattr = BasicInterfaceWithAttributes()
     bifacewattr.my_attr_iface = ANOTHER_RESPONSE