mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-24 14:54:33 +02:00
Fix error when snapshot exists with an underscore in the name
This commit is contained in:
4 files changed
+17
-9
No files matched your search
@@ -61,15 +61,21 @@ def test_snapshot_filename(project):
|
||||
|
||||
def test_json(project):
|
||||
|
||||
snapshot = Snapshot(project, filename="test1_260716_100439.gns3project")
|
||||
snapshot = Snapshot(project, filename="snapshot_test_260716_100439.gns3project")
|
||||
assert snapshot.__json__() == {
|
||||
"snapshot_id": snapshot._id,
|
||||
"name": "test1",
|
||||
"name": "snapshot_test",
|
||||
"project_id": project.id,
|
||||
"created_at": 1469527479
|
||||
}
|
||||
|
||||
|
||||
def test_invalid_snapshot_filename(project):
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
Snapshot(project, filename="snapshot_test_invalid_file.gns3project")
|
||||
|
||||
|
||||
async def test_restore(project, controller):
|
||||
|
||||
compute = AsyncioMagicMock()
|
||||
|
||||
Reference in new issue
Block a user