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'
def test_name(self): """ attribute_name falls back to name """ field = Field() field.name = 'n' assert field.name == 'n' assert field.attribute_name == 'n'