Support for nested global variables

This commit is contained in:
ziajka committed 2018-05-09 11:25:55 +02:00
1 parent 0bcc657bf1
commit 83445214be
2 files changed
+17 -5

No files matched your search

+3 -1
View File
@@ -259,7 +259,8 @@ def test_create_with_project_variables(loop, project, manager):
project.variables = [
{"name": "VAR1"},
{"name": "VAR2", "value": "VAL1"}
{"name": "VAR2", "value": "VAL1"},
{"name": "VAR3", "value": "2x${VAR2}"}
]
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "ubuntu"}]):
@@ -269,6 +270,7 @@ def test_create_with_project_variables(loop, project, manager):
called_kwargs = mock.call_args[1]
assert "VAR1=" in called_kwargs["data"]["Env"]
assert "VAR2=VAL1" in called_kwargs["data"]["Env"]
assert "VAR3=2xVAL1" in called_kwargs["data"]["Env"]
project.variables = None