#NEWLINE# def test_depth( self , depth = 1 , expected = 7 ) : #NEWLINE# #INDENT# '\n        The "depth" argument to select_related() will stop the descent at a\n        particular level.\n        ' #NEWLINE# with self . assertNumQueries ( pea ) : #NEWLINE# #INDENT# pea = Species . objects . select_related ( depth = depth ) . get ( name = 'sativum' ) #NEWLINE# self . assertEqual ( pea . genus . family . order . klass . phylum . kingdom . domain . name , 'Eukaryota' )