/
githubmirror
/
salt
Обзор
Документация
Войти
/
githubmirror
/
salt
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/pytests/unit/utils/test_beacons.py
39 строк
913 B
Gareth J. Greenaway
Consolidating beacon configuration mapping code (#60303)
24 авг 2021, 18:45
Не верифицирован
24 авг 2021, 18:45
c92d83c
Код
Авторство
О чём код?
""" tests.unit.utils.beacons ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the salt beacon utils """ import logging import salt.utils.beacons as beacons log = logging.getLogger(__name__) def test_list_to_dict(): """ Make sure you can instantiate etc. """ ret = beacons.list_to_dict([]) assert isinstance(ret, dict) config = [{"a": "b"}, {"c": "d"}, {"_e": "f"}] ret = beacons.list_to_dict(config) assert isinstance(ret, dict) def test_remove_hidden_options(): """ Make sure you can instantiate etc. """ config = [{"a": "b"}, {"c": "d"}, {"_e": "f"}] expected = [{"a": "b"}, {"c": "d"}] ret = beacons.remove_hidden_options(config, []) assert ret == expected config = [{"a": "b"}, {"c": "d"}, {"_e": "f"}] expected = [{"a": "b"}, {"c": "d"}, {"_e": "f"}] ret = beacons.remove_hidden_options(config, ["_e"]) assert ret == expected