'create a custom field and return it'

def create_field(self, name):

    model = self.env['ir.model'].search([('model', '=', self.MODEL)])
    field = self.env['ir.model.fields'].create({'model_id': model.id, 'name': name, 'field_description': name, 'ttype': 'char'})
    self.assertIn(name, self.env[self.MODEL]._fields)
    return field
