Fix tests running on Python 3.12

This commit is contained in:
grossmj
2023-10-23 16:12:12 +10:00
parent 4af5edbc03
commit 34ee75e1f1
2 changed files with 15 additions and 14 deletions

View File

@ -255,7 +255,7 @@ async def test_qemu_list_binaries(compute_api, vm):
with asyncio_patch("gns3server.compute.qemu.Qemu.binary_list", return_value=ret) as mock:
response = await compute_api.get("/qemu/binaries".format(project_id=vm["project_id"]))
assert mock.called_with(None)
mock.assert_called_with(None)
assert response.status == 200
assert response.json == ret
@ -271,7 +271,7 @@ async def test_qemu_list_binaries_filter(compute_api, vm):
with asyncio_patch("gns3server.compute.qemu.Qemu.binary_list", return_value=ret) as mock:
response = await compute_api.get("/qemu/binaries".format(project_id=vm["project_id"]), body={"archs": ["i386"]})
assert response.status == 200
assert mock.called_with(["i386"])
mock.assert_called_with(["i386"])
assert response.json == ret