mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Add HTTP client to reuse the aiohttp session where needed.
Remove unnecessary aiohttp exceptions.
This commit is contained in:
1 parent
36c8920cd1
commit
a92c47b310
17 files changed
+221
-151
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user