mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Save empty directories when exporting a project
This commit is contained in:
2 files changed
+7
No files matched your search
@@ -111,6 +111,7 @@ async def test_export(tmpdir, project):
|
||||
f.write("HELLO")
|
||||
with open(os.path.join(path, "vm-1", "dynamips", "test_log.txt"), 'w+') as f:
|
||||
f.write("LOG")
|
||||
os.makedirs(os.path.join(path, "vm-1", "dynamips", "empty-dir"))
|
||||
os.makedirs(os.path.join(path, "project-files", "snapshots"))
|
||||
with open(os.path.join(path, "project-files", "snapshots", "test"), 'w+') as f:
|
||||
f.write("WORLD")
|
||||
@@ -127,6 +128,7 @@ async def test_export(tmpdir, project):
|
||||
|
||||
assert 'test.gns3' not in myzip.namelist()
|
||||
assert 'project.gns3' in myzip.namelist()
|
||||
assert 'vm-1/dynamips/empty-dir/' in myzip.namelist()
|
||||
assert 'project-files/snapshots/test' not in myzip.namelist()
|
||||
assert 'vm-1/dynamips/test_log.txt' not in myzip.namelist()
|
||||
|
||||
|
||||
Reference in new issue
Block a user