diff --git a/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py b/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py index 90cbd3db534..84b76f40855 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py +++ b/tests/unit_tests/pyanaconda_tests/modules/localization/test_module_localization.py @@ -217,6 +217,60 @@ def test_locale_data(self): } assert data == english_us + def test_keyboard_layouts_for_language(self): + get_keyboard_layouts = self.localization_interface.GetLocaleKeyboardLayouts + layouts = get_keyboard_layouts("cs_CZ.UTF-8") + + expected_layouts = [ + { + "description": "Czech (extra backslash)", + "layoutId": "cz", + "variantId": "bksl", + }, + { + "description": "Czech (QWERTY)", + "layoutId": "cz", + "variantId": "qwerty", + }, + { + "description": "Czech (QWERTY, extra backslash)", + "layoutId": "cz", + "variantId": "qwerty_bksl", + }, + { + "description": "Czech (QWERTZ, Windows)", + "layoutId": "cz", + "variantId": "winkeys", + }, + { + "description": "Czech (QWERTY, Windows)", + "layoutId": "cz", + "variantId": "winkeys-qwerty", + }, + { + "description": "Czech (QWERTY, Macintosh)", + "layoutId": "cz", + "variantId": "qwerty-mac", + }, + { + "description": "Czech (UCW, only accented letters)", + "layoutId": "cz", + "variantId": "ucw", + }, + { + "description": "Czech (US, Dvorak, UCW support)", + "layoutId": "cz", + "variantId": "dvorak-ucw", + }, + { + "description": "Russian (Czechia, phonetic)", + "layoutId": "cz", + "variantId": "rus", + }, + ] + + assert layouts == expected_layouts + def test_common_locales(self): common_locales = self.localization_interface.GetCommonLocales()