'The "depth" argument to select_related() will stop the descent at a
particular level.'

def test_depth(self, depth=1, expected=7):

    with self.assertNumQueries(expected):
        with warnings.catch_warnings():
            warnings.simplefilter(u'ignore', DeprecationWarning)
            pea = Species.objects.select_related(depth=depth).get(name=u'sativum')
        self.assertEqual(pea.genus.family.order.klass.phylum.kingdom.domain.name, u'Eukaryota')
