mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
2 files changed
+47
-39
No files matched your search
@@ -289,6 +289,14 @@ def test_forward_get(compute, async_run):
|
||||
mock.assert_called_with("GET", "https://example.com:84/v2/compute/qemu/images", auth=None, data=None, headers={'content-type': 'application/json'}, chunked=False)
|
||||
|
||||
|
||||
def test_forward_404(compute, async_run):
|
||||
response = MagicMock()
|
||||
response.status = 404
|
||||
with asyncio_patch("aiohttp.ClientSession.request", return_value=response) as mock:
|
||||
with pytest.raises(aiohttp.web_exceptions.HTTPNotFound):
|
||||
async_run(compute.forward("GET", "qemu", "images"))
|
||||
|
||||
|
||||
def test_forward_post(compute, async_run):
|
||||
response = MagicMock()
|
||||
response.status = 200
|
||||
|
||||
Reference in new issue
Block a user