mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-21 13:45:13 +02:00
Refactor tests
* Use pytest-aiohttp * Use the async def / await syntax. * Fix tests to run with Python 3.8
This commit is contained in:
1 parent
f498ab06b4
commit
d3ea67da24
87 files changed
+3697
-3528
No files matched your search
@@ -24,6 +24,7 @@ from gns3server.utils.path import check_path_allowed, get_default_project_direct
|
||||
|
||||
|
||||
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):
|
||||
@@ -37,7 +38,6 @@ def test_check_path_allowed(config, tmpdir):
|
||||
def test_get_default_project_directory(config):
|
||||
|
||||
config.clear()
|
||||
|
||||
path = os.path.normpath(os.path.expanduser("~/GNS3/projects"))
|
||||
assert get_default_project_directory() == path
|
||||
assert os.path.exists(path)
|
||||
Reference in new issue
Block a user