Ejemplo n.º 1
0
 def test_name_and_attribute_name(self):
     """ name and attribute_name don't collide """
     field = Field(attribute_name='f')
     field.name = 'n'
     assert field.name == 'n'
     assert field.attribute_name == 'f'
Ejemplo n.º 2
0
 def test_name(self):
     """ attribute_name falls back to name """
     field = Field()
     field.name = 'n'
     assert field.name == 'n'
     assert field.attribute_name == 'n'