示例#1
0
 def test_add_by_nothing(self):
     template = Template(mock.Mock())
     self.assertRaises(exc.CommandError, template.add)
示例#2
0
 def test_add_by_template(self):
     template = Template(mock.Mock())
     template.add(template_str=TEMPLATE_STRING)
示例#3
0
 def test_add_by_path(self):
     template_path = get_resources_dir() + '/template1.yaml'
     template = Template(mock.Mock())
     template.add(path=template_path)
示例#4
0
 def test_add_by_nonexisting_path(self):
     template = Template(mock.Mock())
     self.assertRaises(IOError, template.add,
                       path='non_existing_template_path.yaml')
示例#5
0
 def test_validate_by_template(self):
     template = Template(mock.Mock())
     template.validate(template_str=TEMPLATE_STRING)