예제 #1
0
 def test_validate_with_set(self):
     data = {
         "template_name": {
             "definition": "something.{Shot}",
             "validate_with": "template_path"
         }
     }
     result = make_template_strings(data, self.keys, self.template_paths)
     template_string = result.get("template_name")
     self.assertEqual(self.template_path, template_string.validate_with)
예제 #2
0
 def test_validate_with_set(self):
     data = {"template_name": {"definition": "something.{Shot}",
                               "validate_with": "template_path"}}
     result = make_template_strings(data, self.keys, self.template_paths)
     template_string = result.get("template_name")
     self.assertEquals(self.template_path, template_string.validate_with)
예제 #3
0
 def test_complex(self):
     data = {"template_name": {"definition": "something.{Shot}"}}
     result = make_template_strings(data, self.keys, self.template_paths)
     template_string = result.get("template_name")
     self.assertIsInstance(template_string, TemplateString)
     self.assertEqual("template_name", template_string.name)
예제 #4
0
 def test_complex(self):
     data = {"template_name": {"definition": "something.{Shot}"}}
     result = make_template_strings(data, self.keys, self.template_paths)
     template_string = result.get("template_name")
     self.assertIsInstance(template_string, TemplateString)
     self.assertEquals("template_name", template_string.name)