def test_certain_fields(self):
        with self.assertNumQueries(1):
            world = Species.objects.select_related('genus__family')
            families = [o.genus.family.name for o in world]
            self.assertEqual(sorted(families),
                ['Amanitacae', 'Drosophilidae', 'Fabaceae', 'Hominidae'])
The optional fields passed to select_related() control which related
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/modeltests/select_related/tests.py/SelectRelatedTests.test_certain_fields