mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
refactoring
This commit is contained in:
@@ -21,8 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import string
|
import secrets
|
||||||
import random
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import multiprocessing.queues
|
import multiprocessing.queues
|
||||||
import time
|
import time
|
||||||
@@ -36,10 +35,7 @@ from kvmd.apps.cleanup import main
|
|||||||
def test_main(tmpdir) -> None: # type: ignore
|
def test_main(tmpdir) -> None: # type: ignore
|
||||||
queue: multiprocessing.queues.Queue = multiprocessing.Queue()
|
queue: multiprocessing.queues.Queue = multiprocessing.Queue()
|
||||||
|
|
||||||
ustreamer_fake_name = "ustr-" + "".join(
|
ustreamer_fake_name = "ustr-" + secrets.token_hex(3)
|
||||||
random.choice(string.ascii_lowercase + string.digits)
|
|
||||||
for _ in range(5)
|
|
||||||
)
|
|
||||||
|
|
||||||
ustreamer_sock_path = os.path.abspath(str(tmpdir.join("ustreamer-fake.sock")))
|
ustreamer_sock_path = os.path.abspath(str(tmpdir.join("ustreamer-fake.sock")))
|
||||||
kvmd_sock_path = os.path.abspath(str(tmpdir.join("kvmd-fake.sock")))
|
kvmd_sock_path = os.path.abspath(str(tmpdir.join("kvmd-fake.sock")))
|
||||||
|
|||||||
Reference in New Issue
Block a user