def test_get_language_title(self):
        """Test get_language_title utility function"""
        language_code = 'en'
        self.assertEqual(get_language_title(language_code), 'English')

        # Test the case where requested language is not in settings.
        # We can not override settings, since languages in get_language_title()
        # are initialised during import. So, we use fictional language code.
        language_code = 'xx'
        try:
            self.assertEqual(get_language_title(language_code), language_code)
        except __HOLE__:
            self.fail(
                "get_language_title() raises KeyError for missing language")
dataset/ETHPy150Open edoburu/django-parler/parler/tests/test_utils.py/UtilTestCase.test_get_language_title