#NEWLINE# def test_rename_enum( self ) : #NEWLINE# #INDENT# 'Rename an existing enum' #NEWLINE# inmap = self . std_map ( ) #NEWLINE# inmap [ 'schema public' ] . update ( { #NEWLINE# #INDENT# 'type t2' : { #NEWLINE# #INDENT# 'oldname' : 't1' , #NEWLINE# 'labels' : [ 'red' , 'green' , 'blue' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# sql = self . to_sql ( inmap , [ CREATE_ENUM_STMT ] ) #NEWLINE# assert ( sql == [ 'ALTER TYPE t1 RENAME TO t2' ] )