diff options
author | Devaev Maxim <[email protected]> | 2019-04-08 07:13:34 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-04-08 07:13:34 +0300 |
commit | d2559c26b631d7defc880a912e9e6f4a2ff98a77 (patch) | |
tree | ade24c214cdd3ac77e26258f69d7e2d6a369a698 | |
parent | d8a5e3837152c7db21b96a585523481337247e6f (diff) |
refactoring
-rw-r--r-- | tests/test_app_cleanup.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test_app_cleanup.py b/tests/test_app_cleanup.py index 5d5cb743..20f8fdac 100644 --- a/tests/test_app_cleanup.py +++ b/tests/test_app_cleanup.py @@ -21,8 +21,7 @@ import os -import string -import random +import secrets import multiprocessing import multiprocessing.queues import time @@ -36,10 +35,7 @@ from kvmd.apps.cleanup import main def test_main(tmpdir) -> None: # type: ignore queue: multiprocessing.queues.Queue = multiprocessing.Queue() - ustreamer_fake_name = "ustr-" + "".join( - random.choice(string.ascii_lowercase + string.digits) - for _ in range(5) - ) + ustreamer_fake_name = "ustr-" + secrets.token_hex(3) ustreamer_sock_path = os.path.abspath(str(tmpdir.join("ustreamer-fake.sock"))) kvmd_sock_path = os.path.abspath(str(tmpdir.join("kvmd-fake.sock"))) |