diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-05-11 14:18:02 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-05-11 14:18:02 -0700 |
commit | 26ea813d293467921ab6b1e32abd2ab8fcefa3bd (patch) | |
tree | bd641e5867bdd96effa33d62e5c200b5dd7e6331 /tests/unittests/test_datasource/test_azure.py | |
parent | 67e506a50dae2b0c1a806f482670b864e84809ae (diff) | |
download | vyos-cloud-init-26ea813d293467921ab6b1e32abd2ab8fcefa3bd.tar.gz vyos-cloud-init-26ea813d293467921ab6b1e32abd2ab8fcefa3bd.zip |
Fix py26 for rhel (and older versions of python)
Diffstat (limited to 'tests/unittests/test_datasource/test_azure.py')
-rw-r--r-- | tests/unittests/test_datasource/test_azure.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py index 444e2799..aafe1bc2 100644 --- a/tests/unittests/test_datasource/test_azure.py +++ b/tests/unittests/test_datasource/test_azure.py @@ -1,16 +1,8 @@ from cloudinit import helpers from cloudinit.util import b64e, decode_binary, load_file from cloudinit.sources import DataSourceAzure -from ..helpers import TestCase, populate_dir -try: - from unittest import mock -except ImportError: - import mock -try: - from contextlib import ExitStack -except ImportError: - from contextlib2 import ExitStack +from ..helpers import TestCase, populate_dir, mock, ExitStack, PY26, SkipTest import crypt import os @@ -83,6 +75,8 @@ class TestAzureDataSource(TestCase): def setUp(self): super(TestAzureDataSource, self).setUp() + if PY26: + raise SkipTest("Does not work on python 2.6") self.tmp = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.tmp) |