summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_azure.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-26 20:02:31 -0500
committerBarry Warsaw <barry@python.org>2015-01-26 20:02:31 -0500
commit5e2b8ef0703eb4582a5a8ba50ae7c83a8294d65a (patch)
tree9f3c2d6d7cdd3e63e52d54152d3dbb15e916d9f3 /tests/unittests/test_datasource/test_azure.py
parentfe99f7d6d87e88320933957b2933288c6eb2986d (diff)
downloadvyos-cloud-init-5e2b8ef0703eb4582a5a8ba50ae7c83a8294d65a.tar.gz
vyos-cloud-init-5e2b8ef0703eb4582a5a8ba50ae7c83a8294d65a.zip
Repair the Python 2.6 tests.
Diffstat (limited to 'tests/unittests/test_datasource/test_azure.py')
-rw-r--r--tests/unittests/test_datasource/test_azure.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py
index 1f0330b3..97a53bee 100644
--- a/tests/unittests/test_datasource/test_azure.py
+++ b/tests/unittests/test_datasource/test_azure.py
@@ -1,7 +1,7 @@
from cloudinit import helpers
from cloudinit.util import load_file
from cloudinit.sources import DataSourceAzure
-from ..helpers import populate_dir
+from ..helpers import TestCase, populate_dir
try:
from unittest import mock
@@ -84,9 +84,10 @@ def construct_valid_ovf_env(data=None, pubkeys=None, userdata=None):
return content
-class TestAzureDataSource(unittest.TestCase):
+class TestAzureDataSource(TestCase):
def setUp(self):
+ super(TestAzureDataSource, self).setUp()
self.tmp = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, self.tmp)
@@ -416,7 +417,7 @@ class TestAzureDataSource(unittest.TestCase):
load_file(os.path.join(self.waagent_d, 'ovf-env.xml')))
-class TestReadAzureOvf(unittest.TestCase):
+class TestReadAzureOvf(TestCase):
def test_invalid_xml_raises_non_azure_ds(self):
invalid_xml = "<foo>" + construct_valid_ovf_env(data={})
self.assertRaises(DataSourceAzure.BrokenAzureDataSource,