

def test_create_translation(self):
    x = SimpleModel.objects.create()
    x.create_translation('en', tr_title='TITLE_EN')
    x.create_translation('fr', tr_title='TITLE_FR')
    self.assertEqual(sorted(x.get_available_languages()), ['en', 'fr'])

dataset/ETHPy150Open edoburu/django-parler/parler/tests/test_model_attributes.py ModelAttributeTests.test_create_translation/original