summaryrefslogtreecommitdiff
path: root/tests/unittests/test_templating.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/test_templating.py')
-rw-r--r--tests/unittests/test_templating.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unittests/test_templating.py b/tests/unittests/test_templating.py
index 3ba4ed8a..cf7c03b0 100644
--- a/tests/unittests/test_templating.py
+++ b/tests/unittests/test_templating.py
@@ -16,11 +16,23 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+from __future__ import print_function
+
+import sys
+import six
+import unittest
+
from . import helpers as test_helpers
import textwrap
from cloudinit import templater
+try:
+ import Cheetah
+ HAS_CHEETAH = True
+except ImportError:
+ HAS_CHEETAH = False
+
class TestTemplates(test_helpers.TestCase):
def test_render_basic(self):
@@ -38,6 +50,7 @@ class TestTemplates(test_helpers.TestCase):
out_data = templater.basic_render(in_data, {'b': 2})
self.assertEqual(expected_data.strip(), out_data)
+ @test_helpers.skipIf(not HAS_CHEETAH, 'cheetah renderer not available')
def test_detection(self):
blob = "## template:cheetah"