Esempio n. 1
0
    def test_template_with_structure(self):
        frosting = Frosting(self.template)
        frosting.load_yaml_structure(self.structure)
        frosting.add("var1", "1.1.1.1")
        frosting.add("var2", "2.2.2.2")
        result = frosting.compile()

        self.assertEqual(result, "1.1.1.1:2.2.2.2")
Esempio n. 2
0
 def test_validator(self):
     frost = Frosting(self.template)
     frost.load_yaml_structure(self.structure)
     with self.assertRaises(frosting.exceptions.FieldInputNotValid):
         frost.add("var1", "1.1.1.1.1")