"Local" command line parameter is only for stopping

a server that has been started by the desktop GUI
This commit is contained in:
grossmj committed 2022-03-30 18:38:34 +08:00
1 parent 8975f63e2f
commit 900d4f79ee
18 files changed
+138 -186

No files matched your search

+1 -7
View File
@@ -23,17 +23,11 @@ from fastapi import HTTPException
from gns3server.utils.path import check_path_allowed, get_default_project_directory
def test_check_path_allowed(config, tmpdir):
def test_check_path_allowed():
config.settings.Server.local = False
config.settings.Server.projects_path = str(tmpdir)
with pytest.raises(HTTPException):
check_path_allowed("/private")
config.settings.Server.local = True
check_path_allowed(str(tmpdir / "hello" / "world"))
check_path_allowed("/private")
def test_get_default_project_directory(config):