Ejemplo n.º 1
0
 def test_format_args_with_method(self):
     keys = format_args(
         "namespace:", ["arg1", "arg2", "arg3"], True, 0, every_other, [],
         False)
     assert keys == ["namespace:arg1", "arg2", "namespace:arg3"]
Ejemplo n.º 2
0
 def test_format_args_with_non_string(self):
     keys = format_args(
         "namespace:", [1, "arg2"], True, 0, None, [], False)
     assert keys == [1, "namespace:arg2"]
Ejemplo n.º 3
0
 def test_format_is_recursive(self):
     keys = format_args(
         "namespace:", ["arg1", ["arg2", "arg3"]], True, 0, None, [], False)
     assert keys == ["namespace:arg1", ["namespace:arg2", "namespace:arg3"]]
Ejemplo n.º 4
0
 def test_format_args_with_skip(self):
     keys = format_args(
         "namespace:", ["arg1", "arg2"], True, 0, None, [0], False
     )
     assert keys == ["arg1", "namespace:arg2"]
Ejemplo n.º 5
0
 def test_format_args(self):
     keys = format_args(
         "namespace:", ["arg1"], False, 0, None, [], False)
     assert keys == ["namespace:arg1"]