#NEWLINE# def test_foreignkey_to_inherited( self ) : #NEWLINE# #INDENT# with self . assertNumQueries ( 2 ) : #NEWLINE# #INDENT# qs = BookReview . objects . prefetch_related ( 'book' ) #NEWLINE# titles = [ obj . book . title for obj in qs ] #NEWLINE# #UNINDENT# self . assertEqual ( titles , [ 'Poems' , 'More poems' ] )