mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
Use Pydantic to validate the server config file.
This commit is contained in:
1 parent
478119b40d
commit
30ebae207f
61 files changed
+871
-695
No files matched your search
@@ -425,9 +425,9 @@ async def test_create_img_relative(app: FastAPI, client: AsyncClient):
|
||||
assert response.status_code == status.HTTP_204_NO_CONTENT
|
||||
|
||||
|
||||
async def test_create_img_absolute_non_local(app: FastAPI, client: AsyncClient, config: dict) -> None:
|
||||
async def test_create_img_absolute_non_local(app: FastAPI, client: AsyncClient, config) -> None:
|
||||
|
||||
config.set("Server", "local", "false")
|
||||
config.settings.Server.local = False
|
||||
params = {
|
||||
"qemu_img": "/tmp/qemu-img",
|
||||
"path": "/tmp/hda.qcow2",
|
||||
@@ -443,9 +443,9 @@ async def test_create_img_absolute_non_local(app: FastAPI, client: AsyncClient,
|
||||
assert response.status_code == 403
|
||||
|
||||
|
||||
async def test_create_img_absolute_local(app: FastAPI, client: AsyncClient, config: dict) -> None:
|
||||
async def test_create_img_absolute_local(app: FastAPI, client: AsyncClient, config) -> None:
|
||||
|
||||
config.set("Server", "local", "true")
|
||||
config.settings.Server.local = True
|
||||
params = {
|
||||
"qemu_img": "/tmp/qemu-img",
|
||||
"path": "/tmp/hda.qcow2",
|
||||
|
||||
Reference in new issue
Block a user