

def test_translation_is_modified(self):
    r1 = RegularModel.objects.create(original_field='r1')
    r2 = RegularModel.objects.create(original_field='r2')
    instance = ForeignKeyTranslationModel.objects.create(translated_foreign=r1, shared='shared')
    translation = instance.get_translation(instance.language_code)
    self.assertFalse(translation.is_modified)
    instance.translated_foreign = r2
    translation = instance.get_translation(instance.language_code)
    self.assertTrue(translation.is_modified)

dataset/ETHPy150Open edoburu/django-parler/parler/tests/test_model_relations.py TranslationRelationTestCase.test_translation_is_modified/original