

def test_fallback_language_no_current(self):
    '\n        Test whether the fallback language will be returned,\n        even when the current language does not have a translation.\n        '
    x = SimpleModel()
    x.set_current_language(self.conf_fallback)
    x.tr_title = 'TITLE_FALLBACK'
    self.assertEqual(x.safe_translation_getter('tr_title', language_code=self.other_lang1), 'TITLE_FALLBACK')

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