mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
lint fixes
This commit is contained in:
@@ -37,9 +37,9 @@ def test_ok(tmpdir) -> None: # type: ignore
|
||||
queue: "multiprocessing.Queue[Literal[True]]" = multiprocessing.Queue()
|
||||
|
||||
ustreamer_sock_path = os.path.abspath(str(tmpdir.join("ustreamer-fake.sock")))
|
||||
open(ustreamer_sock_path, "w").close()
|
||||
open(ustreamer_sock_path, "w").close() # pylint: disable=consider-using-with
|
||||
kvmd_sock_path = os.path.abspath(str(tmpdir.join("kvmd-fake.sock")))
|
||||
open(kvmd_sock_path, "w").close()
|
||||
open(kvmd_sock_path, "w").close() # pylint: disable=consider-using-with
|
||||
|
||||
def ustreamer_fake() -> None:
|
||||
setproctitle.setproctitle("kvmd/streamer: /usr/bin/ustreamer")
|
||||
|
||||
@@ -164,7 +164,7 @@ def test_fail__unknown_plugin() -> None:
|
||||
|
||||
def test_fail__invalid_passwd(mocker, tmpdir) -> None: # type: ignore
|
||||
path = os.path.abspath(str(tmpdir.join("htpasswd")))
|
||||
open(path, "w").close()
|
||||
open(path, "w").close() # pylint: disable=consider-using-with
|
||||
mocker.patch.object(builtins, "input", (lambda: "\n"))
|
||||
with pytest.raises(SystemExit, match="The argument is not a valid passwd characters"):
|
||||
_run_htpasswd(["set", "admin", "--read-stdin"], path)
|
||||
|
||||
Reference in New Issue
Block a user