#NEWLINE# def test_polymorphic_on_column_str_prop( self ) : #NEWLINE# #INDENT# ( t2 , t1 ) = ( self . tables . t2 , self . tables . t1 ) #NEWLINE# ( Parent , Child ) = ( self . classes . Parent , self . classes . Child ) #NEWLINE# expr = case ( [ ( ( t1 . c . x == 'p' ) , 'parent' ) , ( ( t1 . c . x == 'c' ) , 'child' ) ] ) #NEWLINE# cprop = column_property ( expr ) #NEWLINE# mapper ( Parent , t1 , properties = { #NEWLINE# #INDENT# 'discriminator' : cprop , #NEWLINE# #UNINDENT# } , polymorphic_identity = 'parent' , polymorphic_on = 'discriminator' ) #NEWLINE# mapper ( Child , t2 , inherits = Parent , polymorphic_identity = 'child' ) #NEWLINE# self . _roundtrip ( parent_ident = 'p' , child_ident = 'c' )