From 16fcf6141ec7d87a1e8e22e80ff310af879b63ff Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 8 Dec 2021 00:43:54 +1030 Subject: [PATCH] Fix tests --- gns3server/services/templates.py | 2 +- tests/api/routes/controller/test_images.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/services/templates.py b/gns3server/services/templates.py index 6bcaa0ce..248ca9d1 100644 --- a/gns3server/services/templates.py +++ b/gns3server/services/templates.py @@ -182,7 +182,7 @@ class TemplatesService: image = await self._templates_repo.get_image(image_path) if not image: - raise ControllerNotFoundError(f"Image '{image.filename}' could not be found in the controller database") + raise ControllerNotFoundError(f"Image '{image_path}' could not be found in the controller database") if not os.path.exists(image.path): raise ControllerNotFoundError(f"Image '{image.path}' could not be found on disk") return image diff --git a/tests/api/routes/controller/test_images.py b/tests/api/routes/controller/test_images.py index 1423957b..61d3d33f 100644 --- a/tests/api/routes/controller/test_images.py +++ b/tests/api/routes/controller/test_images.py @@ -273,7 +273,7 @@ class TestImageRoutes: image_data = f.read() response = await client.post( app.url_path_for("upload_image", image_path=image_name), - params={"image_type": "qemu"}, + params={"image_type": "qemu", "install_appliances": "true"}, content=image_data) assert response.status_code == status.HTTP_201_CREATED