salt/tests/pytests/functional/test_crypt.py
2024-02-27 08:07:04 +00:00

13 lines
333 B
Python

import pathlib
import pytest
import salt.crypt
@pytest.mark.windows_whitelisted
def test_generated_keys(tmp_path):
priv = pathlib.Path(salt.crypt.gen_keys(tmp_path, "aaa", 2048))
pub = priv.with_suffix(".pub")
assert "\r" not in priv.read_text(encoding="utf-8")
assert "\r" not in pub.read_text(encoding="utf-8")