mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
When exporting project raise error if export is not possible
This commit is contained in:
3 files changed
+50
-9
No files matched your search
@@ -351,6 +351,30 @@ def test_export(tmpdir, project):
|
||||
assert 'vm-1/dynamips/test_log.txt' not in myzip.namelist()
|
||||
|
||||
|
||||
def test_export_disallow_some_type(tmpdir, project):
|
||||
"""
|
||||
Fix absolute image path
|
||||
"""
|
||||
|
||||
path = project.path
|
||||
|
||||
topology = {
|
||||
"topology": {
|
||||
"nodes": [
|
||||
{
|
||||
"node_type": "virtualbox"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
with open(os.path.join(path, "test.gns3"), 'w+') as f:
|
||||
json.dump(topology, f)
|
||||
|
||||
with pytest.raises(aiohttp.web.HTTPConflict):
|
||||
z = project.export()
|
||||
|
||||
|
||||
def test_export_fix_path(tmpdir, project):
|
||||
"""
|
||||
Fix absolute image path
|
||||
|
||||
Reference in new issue
Block a user