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

Avoid warning when running docker test on travis

This commit is contained in:
Julien Duponchelle 2016-07-22 12:12:58 +02:00
parent 94a262cd46
commit d58bcddbcc
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -46,7 +46,8 @@ def mock_connection():
def vm(http_compute, project, base_params):
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "nginx"}]) as mock_list:
with asyncio_patch("gns3server.compute.docker.Docker.query", return_value={"Id": "8bd8153ea8f5"}) as mock:
response = http_compute.post("/projects/{project_id}/docker/nodes".format(project_id=project.id), base_params)
with asyncio_patch("gns3server.compute.docker.DockerVM._get_container_state", return_value="exited") as mock:
response = http_compute.post("/projects/{project_id}/docker/nodes".format(project_id=project.id), base_params)
if response.status != 201:
print(response.body)
assert response.status == 201