Move more import code to the server

https://github.com/GNS3/gns3-gui/issues/1156
This commit is contained in:
Julien Duponchelle committed 2016-04-05 18:32:48 +02:00
1 parent f8ffd078a8
commit 9ed15e55af
4 files changed
+63 -9

No files matched your search

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