#NEWLINE# def test_entirely_oob_assignment( self ) : #NEWLINE# #INDENT# 'test warn on an unknown polymorphic identity.\n        ' #NEWLINE# B = self . classes . B #NEWLINE# sess = Session ( ) #NEWLINE# b1 = B ( ) #NEWLINE# b1 . class_name = 'xyz' #NEWLINE# sess . add ( b1 ) #NEWLINE# assert_raises_message ( sa_exc . SAWarning , ( "Flushing object %s with incompatible polymorphic identity 'xyz'; the object may not refresh and/or load correctly" % instance_str ( b1 ) ) , sess . flush )