@@ -204,7 +204,12 @@ def test_apply_executes_with_list_of_string_var(self):
204204 terraform .apply (vars = variables )
205205
206206 executor .execute .assert_called_once_with (
207- ["terraform" , "apply" , '-var="foo=["ex", "why", "zed"]"' ], env = None
207+ [
208+ "terraform" ,
209+ "apply" ,
210+ '-var="foo=[\\ "ex\\ ", \\ "why\\ ", \\ "zed\\ "]"' ,
211+ ],
212+ env = None ,
208213 )
209214
210215 def test_apply_executes_with_list_of_integer_var (self ):
@@ -259,7 +264,12 @@ def test_apply_executes_with_mapping_of_string_var(self):
259264 terraform .apply (vars = variables )
260265
261266 executor .execute .assert_called_once_with (
262- ["terraform" , "apply" , '-var="foo={"a": "x", "b": "y"}"' ], env = None
267+ [
268+ "terraform" ,
269+ "apply" ,
270+ '-var="foo={\\ "a\\ ": \\ "x\\ ", \\ "b\\ ": \\ "y\\ "}"' ,
271+ ],
272+ env = None ,
263273 )
264274
265275 def test_apply_executes_with_mapping_of_integer_var (self ):
@@ -270,7 +280,8 @@ def test_apply_executes_with_mapping_of_integer_var(self):
270280 terraform .apply (vars = variables )
271281
272282 executor .execute .assert_called_once_with (
273- ["terraform" , "apply" , '-var="foo={"a": 1, "b": 2}"' ], env = None
283+ ["terraform" , "apply" , '-var="foo={\\ "a\\ ": 1, \\ "b\\ ": 2}"' ],
284+ env = None ,
274285 )
275286
276287 def test_apply_executes_with_mapping_of_float_var (self ):
@@ -281,7 +292,8 @@ def test_apply_executes_with_mapping_of_float_var(self):
281292 terraform .apply (vars = variables )
282293
283294 executor .execute .assert_called_once_with (
284- ["terraform" , "apply" , '-var="foo={"a": 1.1, "b": 2.2}"' ], env = None
295+ ["terraform" , "apply" , '-var="foo={\\ "a\\ ": 1.1, \\ "b\\ ": 2.2}"' ],
296+ env = None ,
285297 )
286298
287299 def test_apply_executes_with_mapping_of_boolean_var (self ):
@@ -292,7 +304,11 @@ def test_apply_executes_with_mapping_of_boolean_var(self):
292304 terraform .apply (vars = variables )
293305
294306 executor .execute .assert_called_once_with (
295- ["terraform" , "apply" , '-var="foo={"a": true, "b": false}"' ],
307+ [
308+ "terraform" ,
309+ "apply" ,
310+ '-var="foo={\\ "a\\ ": true, \\ "b\\ ": false}"' ,
311+ ],
296312 env = None ,
297313 )
298314
@@ -304,7 +320,11 @@ def test_apply_executes_with_mapping_of_none_var(self):
304320 terraform .apply (vars = variables )
305321
306322 executor .execute .assert_called_once_with (
307- ["terraform" , "apply" , '-var="foo={"a": true, "b": false}"' ],
323+ [
324+ "terraform" ,
325+ "apply" ,
326+ '-var="foo={\\ "a\\ ": true, \\ "b\\ ": false}"' ,
327+ ],
308328 env = None ,
309329 )
310330
0 commit comments