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