

def test_deep_select_related_through_vanilla(self):
    with translation.override('en'):
        with self.assertNumQueries(1):
            obj = StandardRelated.objects.language().select_related('standard__normal').get(pk=self.standardrel1.pk)
        with self.assertNumQueries(0):
            self.assertEqual(obj.standard.pk, self.standard_id[1])
            self.assertEqual(obj.standard.normal.pk, self.normal_id[STANDARD[1].normal])

dataset/ETHPy150Open KristianOellegaard/django-hvad/hvad/tests/related.py DeepSelectRelatedTests.test_deep_select_related_through_vanilla/original