@@ -204,7 +204,12 @@ def test_apply_executes_with_list_of_string_var(self):
204
204
terraform .apply (vars = variables )
205
205
206
206
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 ,
208
213
)
209
214
210
215
def test_apply_executes_with_list_of_integer_var (self ):
@@ -259,7 +264,12 @@ def test_apply_executes_with_mapping_of_string_var(self):
259
264
terraform .apply (vars = variables )
260
265
261
266
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 ,
263
273
)
264
274
265
275
def test_apply_executes_with_mapping_of_integer_var (self ):
@@ -270,7 +280,8 @@ def test_apply_executes_with_mapping_of_integer_var(self):
270
280
terraform .apply (vars = variables )
271
281
272
282
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 ,
274
285
)
275
286
276
287
def test_apply_executes_with_mapping_of_float_var (self ):
@@ -281,7 +292,8 @@ def test_apply_executes_with_mapping_of_float_var(self):
281
292
terraform .apply (vars = variables )
282
293
283
294
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 ,
285
297
)
286
298
287
299
def test_apply_executes_with_mapping_of_boolean_var (self ):
@@ -292,7 +304,11 @@ def test_apply_executes_with_mapping_of_boolean_var(self):
292
304
terraform .apply (vars = variables )
293
305
294
306
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
+ ],
296
312
env = None ,
297
313
)
298
314
@@ -304,7 +320,11 @@ def test_apply_executes_with_mapping_of_none_var(self):
304
320
terraform .apply (vars = variables )
305
321
306
322
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
+ ],
308
328
env = None ,
309
329
)
310
330
0 commit comments