def test_other_entities_are_not_deleted(self):
        gazette = GazetteItemFactory()
        entity1 = EntityFactory()
        entity2 = EntityFactory()

        gazette.save()
        entity1.gazette = gazette
        entity1.save()
        entity2.save()

        entity1_id = entity1.id
        entity2_id = entity2.id
        gazette.delete()
        with self.assertRaises(ObjectDoesNotExist):
            Entity.objects.get(pk=entity1_id)

        try:
            Entity.objects.get(pk=entity2_id)
        except __HOLE__:
            self.fail("Entity does not exists and it should")
dataset/ETHPy150Open machinalis/iepy/tests/test_entity.py/TestEntityGazetteRelation.test_other_entities_are_not_deleted