Add HTTP client to reuse the aiohttp session where needed.

Remove unnecessary aiohttp exceptions.
This commit is contained in:
grossmj committed 2020-10-22 16:19:44 +10:30
1 parent 36c8920cd1
commit a92c47b310
17 files changed
+221 -151

No files matched your search

+2 -2
View File
@@ -17,8 +17,8 @@
import os
import pytest
import aiohttp
from fastapi import HTTPException
from gns3server.utils.path import check_path_allowed, get_default_project_directory
@@ -27,7 +27,7 @@ def test_check_path_allowed(config, tmpdir):
config.set("Server", "local", False)
config.set("Server", "projects_path", str(tmpdir))
with pytest.raises(aiohttp.web.HTTPForbidden):
with pytest.raises(HTTPException):
check_path_allowed("/private")
config.set("Server", "local", True)