1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Fix more tests

(cherry picked from commit 546982d1ea)
This commit is contained in:
grossmj 2020-08-13 17:18:45 +09:30 committed by Bernhard Ehlers
parent c684c554bf
commit 9d3f7c79a2
2 changed files with 4 additions and 3 deletions

View File

@ -117,8 +117,8 @@ def images_dir(config):
path = config.get_section_config("Server").get("images_path") path = config.get_section_config("Server").get("images_path")
os.makedirs(path, exist_ok=True) os.makedirs(path, exist_ok=True)
os.makedirs(os.path.join(path, "QEMU")) os.makedirs(os.path.join(path, "QEMU"), exist_ok=True)
os.makedirs(os.path.join(path, "IOU")) os.makedirs(os.path.join(path, "IOU"), exist_ok=True)
return path return path

View File

@ -277,7 +277,8 @@ async def test_images(compute_api, fake_qemu_vm):
response = await compute_api.get("/qemu/images") response = await compute_api.get("/qemu/images")
assert response.status == 200 assert response.status == 200
assert response.json == [{"filename": "linux载.img", "path": "linux载.img", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1}] assert response.json == [{'filename': 'config.img', 'filesize': 1048576, 'md5sum': '0ab49056760ae1db6c25376446190b47', 'path': 'config.img'},
{"filename": "linux载.img", "path": "linux载.img", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1}]
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Does not work on Windows") @pytest.mark.skipif(sys.platform.startswith("win"), reason="Does not work on Windows")