mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-20 05:05:14 +02:00
Use Pydantic to validate the server config file.
This commit is contained in:
1 parent
478119b40d
commit
30ebae207f
61 files changed
+871
-695
No files matched your search
@@ -71,7 +71,7 @@ def test_json(project):
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_restore(project, controller):
|
||||
async def test_restore(project, controller, config):
|
||||
|
||||
compute = AsyncioMagicMock()
|
||||
compute.id = "local"
|
||||
@@ -95,8 +95,8 @@ async def test_restore(project, controller):
|
||||
assert len(project.nodes) == 2
|
||||
|
||||
controller._notification = MagicMock()
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={"local": True}):
|
||||
await snapshot.restore()
|
||||
config.settings.Server.local = True
|
||||
await snapshot.restore()
|
||||
|
||||
assert "snapshot.restored" in [c[0][0] for c in controller.notification.project_emit.call_args_list]
|
||||
# project.closed notification should not be send when restoring snapshots
|
||||
|
||||
Reference in new issue
Block a user