

def test_exclude_by_shared_field(self):
    manager = get_translation_aware_manager(Standard)
    with translation.override('en'):
        qs = manager.exclude(normal__shared_field=NORMAL[STANDARD[1].normal].shared_field)
        self.assertCountEqual([obj.pk for obj in qs], [self.standard_id[2]])
        qs.assertCountEqual([obj.normal.pk for obj in qs], [self.normal_id[STANDARD[2].normal]])
        self.assertCountEqual([obj.normal.shared_field for obj in qs], [NORMAL[STANDARD[2].normal].shared_field])
        qs = manager.exclude(normal=self.normal_id[1])
        self.assertCountEqual([obj.pk for obj in qs], [self.standard_id[2]])
        self.assertCountEqual([obj.normal.pk for obj in qs], [self.normal_id[STANDARD[2].normal]])
        self.assertCountEqual([obj.normal.shared_field for obj in qs], [NORMAL[STANDARD[2].normal].shared_field])

dataset/ETHPy150Open KristianOellegaard/django-hvad/hvad/tests/related.py StandardToTransFKTest.test_exclude_by_shared_field/VarMisuse@72/94 `self`->`qs`