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

Lower docker requirements in tests also

This commit is contained in:
Julien Duponchelle 2017-04-24 18:49:47 +02:00
parent 1a90305baa
commit 2da581139c
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -47,7 +47,7 @@ def test_query_success(loop, vm):
vm._session.request = AsyncioMagicMock(return_value=response) vm._session.request = AsyncioMagicMock(return_value=response)
data = loop.run_until_complete(asyncio.async(vm.query("POST", "test", data={"a": True}, params={"b": 1}))) data = loop.run_until_complete(asyncio.async(vm.query("POST", "test", data={"a": True}, params={"b": 1})))
vm._session.request.assert_called_with('POST', vm._session.request.assert_called_with('POST',
'http://docker/v1.27/test', 'http://docker/v1.25/test',
data='{"a": true}', data='{"a": true}',
headers={'content-type': 'application/json'}, headers={'content-type': 'application/json'},
params={'b': 1}, params={'b': 1},
@ -70,7 +70,7 @@ def test_query_error(loop, vm):
with pytest.raises(DockerError): with pytest.raises(DockerError):
data = loop.run_until_complete(asyncio.async(vm.query("POST", "test", data={"a": True}, params={"b": 1}))) data = loop.run_until_complete(asyncio.async(vm.query("POST", "test", data={"a": True}, params={"b": 1})))
vm._session.request.assert_called_with('POST', vm._session.request.assert_called_with('POST',
'http://docker/v1.27/test', 'http://docker/v1.25/test',
data='{"a": true}', data='{"a": true}',
headers={'content-type': 'application/json'}, headers={'content-type': 'application/json'},
params={'b': 1}, params={'b': 1},
@ -91,7 +91,7 @@ def test_query_error_json(loop, vm):
with pytest.raises(DockerError): with pytest.raises(DockerError):
data = loop.run_until_complete(asyncio.async(vm.query("POST", "test", data={"a": True}, params={"b": 1}))) data = loop.run_until_complete(asyncio.async(vm.query("POST", "test", data={"a": True}, params={"b": 1})))
vm._session.request.assert_called_with('POST', vm._session.request.assert_called_with('POST',
'http://docker/v1.27/test', 'http://docker/v1.25/test',
data='{"a": true}', data='{"a": true}',
headers={'content-type': 'application/json'}, headers={'content-type': 'application/json'},
params={'b': 1}, params={'b': 1},