summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-02-10 15:46:48 -0500
committerScott Moser <smoser@ubuntu.com>2015-02-10 15:46:48 -0500
commit4b578b2d1fbc6af141081c457ffc74c811e788f3 (patch)
treee018a73039fa798ffdb81ca7a2b180186feb9294
parenta4a6702758cf60ecb8742d78e576733dbbdbb9a0 (diff)
downloadvyos-cloud-init-4b578b2d1fbc6af141081c457ffc74c811e788f3.tar.gz
vyos-cloud-init-4b578b2d1fbc6af141081c457ffc74c811e788f3.zip
skip cheetah dependent test
-rw-r--r--tests/unittests/test_templating.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unittests/test_templating.py b/tests/unittests/test_templating.py
index 2b821150..cf7c03b0 100644
--- a/tests/unittests/test_templating.py
+++ b/tests/unittests/test_templating.py
@@ -27,6 +27,12 @@ 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):
@@ -44,7 +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(six.PY3, 'Cheetah is not compatible with Python 3')
+ @test_helpers.skipIf(not HAS_CHEETAH, 'cheetah renderer not available')
def test_detection(self):
blob = "## template:cheetah"