/
githubmirror
/
salt
Обзор
Документация
Войти
/
githubmirror
/
salt
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/unit/utils/test_zeromq.py
26 строк
674 B
Pedro Algarvio
Update pre-commit hook versions
29 фев 2024, 15:30
Не верифицирован
29 фев 2024, 15:30
f454911
Код
Авторство
О чём код?
""" Test salt.utils.zeromq """ import pytest import zmq import salt.utils.zeromq from salt.exceptions import SaltSystemExit from tests.support.mock import patch from tests.support.unit import TestCase class UtilsTestCase(TestCase): @pytest.mark.skipif( not hasattr(zmq, "IPC_PATH_MAX_LEN"), reason="ZMQ does not have max length support.", ) def test_check_ipc_length(self): """ Ensure we throw an exception if we have a too-long IPC URI """ with patch("zmq.IPC_PATH_MAX_LEN", 1): self.assertRaises( SaltSystemExit, salt.utils.zeromq.check_ipc_path_max_len, "1" * 1024 )