#NEWLINE# def test_polymorphic___filter( self ) : #NEWLINE# #INDENT# self . create_model2abcd ( ) #NEWLINE# objects = Model2A . objects . filter ( ( Q ( Model2B___field2 = 'B2' ) | Q ( Model2C___field3 = 'C3' ) ) ) #NEWLINE# self . assertEqual ( len ( objects ) , 2 ) #NEWLINE# self . assertEqual ( repr ( self [ 0 ] ) , '<Model2B: id 2, field1 (CharField), field2 (CharField)>' ) #NEWLINE# self . assertEqual ( repr ( objects [ 1 ] ) , '<Model2C: id 3, field1 (CharField), field2 (CharField), field3 (CharField)>' )