#NEWLINE# def test_only_with_select_related( self ) : #NEWLINE# #INDENT# obj = Primary . objects . select_related ( ) . only ( 'related__first' ) [ 0 ] #NEWLINE# self . assert_delayed ( self , 2 ) #NEWLINE# self . assert_delayed ( obj . related , 1 ) #NEWLINE# self . assertEqual ( obj . related_id , self . s1 . pk ) #NEWLINE# self . assertEqual ( obj . name , 'p1' )