mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Move more import code to the server
https://github.com/GNS3/gns3-gui/issues/1156
This commit is contained in:
4 files changed
+63
-9
No files matched your search
@@ -306,12 +306,12 @@ def test_export(server, tmpdir, loop, project):
|
||||
assert content == b"hello"
|
||||
|
||||
|
||||
def test_import(server, tmpdir, loop):
|
||||
def test_import(server, tmpdir, loop, project):
|
||||
|
||||
with zipfile.ZipFile(str(tmpdir / "test.zip"), 'w') as myzip:
|
||||
myzip.writestr("demo", b"hello")
|
||||
|
||||
project_id = str(uuid.uuid4())
|
||||
project_id = project.id
|
||||
|
||||
with open(str(tmpdir / "test.zip"), "rb") as f:
|
||||
response = server.post("/projects/{project_id}/import".format(project_id=project_id), body=f.read(), raw=True)
|
||||
|
||||
Reference in new issue
Block a user