mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-30 09:38:53 +00:00
Fix test
This commit is contained in:
parent
884bfa4724
commit
fd0fb97204
@ -121,10 +121,9 @@ def test_list_images(loop):
|
|||||||
with asyncio_patch("gns3server.modules.docker.Docker.query", return_value=response) as mock:
|
with asyncio_patch("gns3server.modules.docker.Docker.query", return_value=response) as mock:
|
||||||
images = loop.run_until_complete(asyncio.async(Docker.instance().list_images()))
|
images = loop.run_until_complete(asyncio.async(Docker.instance().list_images()))
|
||||||
mock.assert_called_with("GET", "images/json", params={"all": 0})
|
mock.assert_called_with("GET", "images/json", params={"all": 0})
|
||||||
assert images == [
|
assert len(images) == 5
|
||||||
{"image": "ubuntu:12.04"},
|
assert {"image": "ubuntu:12.04"} in images
|
||||||
{"image": "ubuntu:precise"},
|
assert {"image": "ubuntu:precise"} in images
|
||||||
{"image": "ubuntu:latest"},
|
assert {"image": "ubuntu:latest"} in images
|
||||||
{"image": "ubuntu:12.10"},
|
assert {"image": "ubuntu:12.10"} in images
|
||||||
{"image": "ubuntu:quantal"}
|
assert {"image": "ubuntu:quantal"} in images
|
||||||
]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user