Skip to content

Commit fab9e63

Browse files
author
孙圣翔
committed
fix tests
1 parent 41dce60 commit fab9e63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_invalid_port():
3030

3131
def test_invalid_root():
3232
"""测试无效根目录"""
33-
result = runner.invoke(app, ["--root", "/nonexistent/path"])
33+
result = runner.invoke(app, ["--directory", "/nonexistent/path"])
3434
assert result.exit_code == 2
3535
for word in "Directory '/nonexistent/path' does not exist".split():
3636
assert word in result.stdout
@@ -44,7 +44,7 @@ def test_server_start(temp_dir):
4444
"""测试服务器启动"""
4545
with patch("servefs.cli.uvicorn.run") as mock_run:
4646
result = runner.invoke(app, [
47-
"--root", str(temp_dir),
47+
"--directory", str(temp_dir),
4848
"--port", "8888",
4949
"--host", "127.0.0.1",
5050
"--debug"

0 commit comments

Comments
 (0)