def test_any_fallback_model(self):
        x = AnyLanguageModel()
        x.set_current_language(self.other_lang1)
        x.tr_title = "TITLE_XX"

        x.save()

        with translation.override(self.other_lang2):
            x = AnyLanguageModel.objects.get(pk=x.pk)
            self.assertRaises(TranslationDoesNotExist, lambda: x._get_translated_model(use_fallback=True))
            self.assertEqual(x.tr_title, 'TITLE_XX')  # Even though there is no current language, there is a value.

            self.assertNumQueries(0, lambda: x._get_any_translated_model())   # Can fetch from cache next time.
            self.assertEqual(x._get_any_translated_model().language_code, self.other_lang1)
Test stripping of URL scheme
dataset/ETHPy150Open edoburu/django-parler/parler/tests/test_model_attributes.py/ModelAttributeTests.test_any_fallback_model--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/utils/url_test.py/UrlTestCase.test_strip_url_with_scheme