

def test_model_with_zero_pk(self):
    '\n        tests that the translated model is returned also when the pk is 0\n        '
    x = SimpleModel()
    x.set_current_language(self.other_lang1)
    x.pk = 0
    x.tr_title = 'EMPTY_PK'
    x.save()
    try:
        SimpleModel.objects.get(pk=x.pk)
    except TranslationDoesNotExist:
        self.fail('zero pk is not supported!')

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