def test_rename_attribute(self):
        if self.db.version < 90100:
            self.skipTest('Only available on PG 9.1')
        inmap = self.std_map()
        inmap['schema public'].update({'type t1': {
            'attributes': [{'x': {'type': 'integer'}},
                           {'y1': {'type': 'integer', 'oldname': 'y'}},
                           {'z': {'type': 'integer'}}]}})
        sql = self.to_sql(inmap, [CREATE_COMPOSITE_STMT])
        assert fix_indent(sql[0]) == "ALTER TYPE t1 RENAME ATTRIBUTE y TO y1"
Rename an attribute of a composite type
dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_type.py/CompositeToSqlTestCase.test_rename_attribute