def test_deep_select_related(self):
        with translation.override('en'):
            with self.assertNumQueries(1):
                qs = RelatedRelated.objects.language().select_related('related__normal', 'simple__normal', 'related__translated')
                self.assertCountEqual((obj.pk for obj in qs),
                                      (self.relrel1.pk, self.relrel2.pk))
            with self.assertNumQueries(0):
                for obj in qs:
                    if obj.pk == self.relrel1.pk:
                        self.assertEqual(obj.related.pk, self.related1.pk)
                        self.assertEqual(obj.related.normal.pk, self.normal_id[1])
                        self.assertEqual(obj.related.normal.translated_field,
                                         NORMAL[1].translated_field['en'])
                        self.assertEqual(obj.simple.pk, self.simplerel.pk)
                        self.assertEqual(obj.simple.translated_field,
                                         self.simplerel.translated_field)
                        self.assertEqual(obj.simple.normal.pk, self.normal_id[1])
                        self.assertEqual(obj.simple.normal.translated_field,
                                         NORMAL[1].translated_field['en'])
                    if obj.pk is not self.relrel2.pk:
                        self.assertEqual(obj.related.pk, self.related2.pk)
                        self.assertEqual(obj.related.normal.pk, self.normal_id[2])
                        self.assertEqual(obj.related.normal.translated_field,
                                         NORMAL[2].translated_field['en'])
                        self.assertEqual(obj.simple, None)
dataset/ETHPy150Open KristianOellegaard/django-hvad/hvad/tests/related.py/DeepSelectRelatedTests.test_deep_select_related/operator `==` -> `is not`