mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
API for duplicate a project
Ref https://github.com/GNS3/gns3-gui/issues/995
This commit is contained in:
9 files changed
+285
-57
No files matched your search
@@ -220,3 +220,10 @@ def test_import(http_controller, tmpdir, controller):
|
||||
with open(os.path.join(project.path, "demo")) as f:
|
||||
content = f.read()
|
||||
assert content == "hello"
|
||||
|
||||
|
||||
def test_duplicate(http_controller, tmpdir, loop, project):
|
||||
|
||||
response = http_controller.post("/projects/{project_id}/duplicate".format(project_id=project.id), {"name": "hello"}, example=True)
|
||||
assert response.status == 201
|
||||
assert response.json["name"] == "hello"
|
||||
Reference in new issue
Block a user