@@ -264,7 +264,7 @@ def test_walk_and_apply_json():
264
264
"CamelCaseObjectChildTwo" : "value2" ,
265
265
},
266
266
"IgnoreMyChildren" : {"ShouldNotBeTouchedOne" : "const1" , "ShouldNotBeTouchedTwo" : "const2" },
267
- "ShouldNotIgnoreMyChildren" : {"NopeNope" : "no" }
267
+ "ShouldNotIgnoreMyChildren" : {"NopeNope" : "no" },
268
268
}
269
269
270
270
result = parser_utils .walk_and_apply_json (
@@ -280,35 +280,26 @@ def test_walk_and_apply_json():
280
280
"ShouldNotBeTouchedOne" : "const1" ,
281
281
"ShouldNotBeTouchedTwo" : "const2" ,
282
282
},
283
- "should_not_ignore_my_children" : { "nope_nope" : "no" }
283
+ "should_not_ignore_my_children" : {"nope_nope" : "no" },
284
284
}
285
285
286
+
286
287
def test_walk_and_apply_json_no_stop ():
287
288
test_json = {
288
289
"CamelCaseKey" : "value" ,
289
290
"CamelCaseObjectKey" : {
290
291
"CamelCaseObjectChildOne" : "value1" ,
291
292
"CamelCaseObjectChildTwo" : "value2" ,
292
293
},
293
- "CamelCaseObjectListKey" : {
294
- "instance.ml.type.xlarge" : [
295
- {"ShouldChangeMe" : "string" }
296
- ]
297
- }
294
+ "CamelCaseObjectListKey" : {"instance.ml.type.xlarge" : [{"ShouldChangeMe" : "string" }]},
298
295
}
299
296
300
- result = parser_utils .walk_and_apply_json (
301
- test_json , parser_utils .camel_to_snake
302
- )
297
+ result = parser_utils .walk_and_apply_json (test_json , parser_utils .camel_to_snake )
303
298
assert result == {
304
299
"camel_case_key" : "value" ,
305
300
"camel_case_object_key" : {
306
301
"camel_case_object_child_one" : "value1" ,
307
302
"camel_case_object_child_two" : "value2" ,
308
303
},
309
- "camel_case_object_list_key" : {
310
- "instance.ml.type.xlarge" : [
311
- { "should_change_me" : "string" }
312
- ]
313
- },
304
+ "camel_case_object_list_key" : {"instance.ml.type.xlarge" : [{"should_change_me" : "string" }]},
314
305
}
0 commit comments