Refactor tests

* Use pytest-aiohttp
* Use the async def / await syntax.
* Fix tests to run with Python 3.8
This commit is contained in:
grossmj committed 2020-06-16 13:59:03 +09:30
1 parent f498ab06b4
commit d3ea67da24
87 files changed
+3697 -3528

No files matched your search

+1 -1
View File
@@ -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)