mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge remote-tracking branch 'origin/asyncio' into asyncio
Conflicts: gns3server/modules/project.py tests/modules/test_project.py
This commit is contained in:
commit
b680138073
5 files changed
+67
-9
No files matched your search
@@ -53,7 +53,6 @@ def test_path(tmpdir):
|
||||
p = Project(location=str(tmpdir))
|
||||
assert p.path == os.path.join(str(tmpdir), p.id)
|
||||
assert os.path.exists(os.path.join(str(tmpdir), p.id))
|
||||
assert os.path.exists(os.path.join(str(tmpdir), p.id, 'vms'))
|
||||
assert not os.path.exists(os.path.join(p.path, '.gns3_temporary'))
|
||||
|
||||
|
||||
@@ -77,9 +76,16 @@ def test_changing_location_not_allowed(tmpdir):
|
||||
p = Project(location=str(tmpdir))
|
||||
|
||||
|
||||
def test_changing_path_not_allowed(tmpdir):
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={"local": False}):
|
||||
with pytest.raises(aiohttp.web.HTTPForbidden):
|
||||
p = Project()
|
||||
p.path = str(tmpdir)
|
||||
|
||||
|
||||
def test_json(tmpdir):
|
||||
p = Project()
|
||||
assert p.__json__() == {"location": p.location, "project_id": p.id, "temporary": False}
|
||||
assert p.__json__() == {"location": p.location, "path": p.path, "project_id": p.id, "temporary": False}
|
||||
|
||||
|
||||
def test_vm_working_directory(tmpdir, vm):
|
||||
|
||||
Reference in new issue
Block a user