1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 00:38:10 +00:00

Fix tests

This commit is contained in:
grossmj 2021-12-08 00:43:54 +10:30
parent 05d2579907
commit 16fcf6141e
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ class TemplatesService:
image = await self._templates_repo.get_image(image_path) image = await self._templates_repo.get_image(image_path)
if not image: 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): if not os.path.exists(image.path):
raise ControllerNotFoundError(f"Image '{image.path}' could not be found on disk") raise ControllerNotFoundError(f"Image '{image.path}' could not be found on disk")
return image return image

View File

@ -273,7 +273,7 @@ class TestImageRoutes:
image_data = f.read() image_data = f.read()
response = await client.post( response = await client.post(
app.url_path_for("upload_image", image_path=image_name), app.url_path_for("upload_image", image_path=image_name),
params={"image_type": "qemu"}, params={"image_type": "qemu", "install_appliances": "true"},
content=image_data) content=image_data)
assert response.status_code == status.HTTP_201_CREATED assert response.status_code == status.HTTP_201_CREATED