Beispiel #1
0
 def test_replace_bool(self):
     bindings = YamlBindings()
     bindings.import_dict({'a': True, 'container': {'b': False}})
     self.assertEqual(
         'This is True False or false',
         bindings.replace('This is ${a} ${container.b} or ${c:false}'))
Beispiel #2
0
 def test_replace_int(self):
     bindings = YamlBindings()
     bindings.import_dict({'a': 1, 'container': {'b': 2}})
     self.assertEqual(
         'This is 1 2 or 3',
         bindings.replace('This is ${a} ${container.b} or ${c:3}'))
Beispiel #3
0
 def test_replace(self):
     bindings = YamlBindings()
     bindings.import_dict({'a': 'A', 'container': {'b': 'B'}})
     self.assertEqual(
         'This is A B or C',
         bindings.replace('This is ${a} ${container.b} or ${c:C}'))
Beispiel #4
0
 def test_replace_bool(self):
   bindings = YamlBindings()
   bindings.import_dict({'a': True, 'container': {'b': False}})
   self.assertEqual('This is True False or false',
                    bindings.replace('This is ${a} ${container.b} or ${c:false}'))
Beispiel #5
0
 def test_replace_int(self):
   bindings = YamlBindings()
   bindings.import_dict({'a': 1, 'container': {'b': 2}})
   self.assertEqual('This is 1 2 or 3',
                    bindings.replace('This is ${a} ${container.b} or ${c:3}'))
Beispiel #6
0
 def test_replace(self):
   bindings = YamlBindings()
   bindings.import_dict({'a': 'A', 'container': {'b': 'B'}})
   self.assertEqual('This is A B or C',
                    bindings.replace('This is ${a} ${container.b} or ${c:C}'))