def test_render_template(self):
     # execute executable files, moustache non-executables
     self.assertEqual(oca.render_template(template(
         "/etc/glance/script.conf"), {"x": "abc"}), "abc\n")
     self.assertRaises(
         config_exception.ConfigException, oca.render_template, template(
             "/etc/glance/script.conf"), {})
 def test_render_template(self):
     # execute executable files, moustache non-executables
     self.assertEqual(
         oca.render_template(template("/etc/glance/script.conf"),
                             {"x": "abc"}), "abc\n")
     self.assertRaises(config_exception.ConfigException,
                       oca.render_template,
                       template("/etc/glance/script.conf"), {})
def test_render_template():
    # execute executable files, moustache non-executables
    assert render_template(template("/etc/glance/script.conf"),
                           {"x": "abc"}) == "abc\n"
    assert_raises(ConfigException, render_template,
                  template("/etc/glance/script.conf"), {})