diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-02-10 20:53:20 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-02-10 20:53:20 -0500 |
commit | cd632b2f153a61faa48531cb41d0288650e72c71 (patch) | |
tree | a3a35b9ca437d999a15fdd25c0a0de88e3cafafb /tests/unittests/test_templating.py | |
parent | 78915c97c18d678db10e0fde0d9306823c5f4610 (diff) | |
parent | f5f280cae778bd214b91664f28d9eed997fbcda5 (diff) | |
download | vyos-cloud-init-cd632b2f153a61faa48531cb41d0288650e72c71.tar.gz vyos-cloud-init-cd632b2f153a61faa48531cb41d0288650e72c71.zip |
python3 support.
This gives us functional python3 support. There are likely
still bugs, but instance boot on openstack is functional now.
LP: #1247132
Diffstat (limited to 'tests/unittests/test_templating.py')
-rw-r--r-- | tests/unittests/test_templating.py | 13 |
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" |