Example #1
0
 def it_walks_list():
     m = [4, 3]
     got = utils.block_all_key_vals(m)
     assert got == [("0", 4), ("1", 3)]
Example #2
0
 def it_walks_recursive():
     m = Munch(a=1, b=dict(b1=3, b2=4), c=[5, 6])
     got = utils.block_all_key_vals(m)
     assert got == [("a", 1), ("b.b1", 3), ("b.b2", 4), ("c.0", 5), ("c.1", 6)]
Example #3
0
 def it_walks_dict():
     m = Munch(a=1, b=2)
     got = utils.block_all_key_vals(m)
     assert got == [("a", 1), ("b", 2)]