

def test_relation(self):
    "\n        'normal' (aka 'shared') relations are relations from the shared (or\n        normal) model to another shared (or normal) model.\n\n        They should behave like normal foreign keys in Django\n        "
    normal = Normal.objects.language('en').get(pk=self.normal_id[1])
    related = Related.objects.create(normal=normal)
    self.assertEqual(related.normal.pk, normal.pk)
    self.assertEqual(self.normal.shared_field, normal.shared_field)
    self.assertEqual(related.normal.translated_field, normal.translated_field)
    self.assertTrue((related in normal.rel1.all()))

dataset/ETHPy150Open KristianOellegaard/django-hvad/hvad/tests/related.py NormalToNormalFKTest.test_relation/VarMisuse@67/150 `related`->`self`