diff options
Diffstat (limited to 'tests/unittests')
27 files changed, 29 insertions, 29 deletions
diff --git a/tests/unittests/test_builtin_handlers.py b/tests/unittests/test_builtin_handlers.py index b387f13b..af7f442e 100644 --- a/tests/unittests/test_builtin_handlers.py +++ b/tests/unittests/test_builtin_handlers.py @@ -2,7 +2,7 @@ import os -from tests.unittests import helpers as test_helpers +from . import helpers as test_helpers from cloudinit import handlers from cloudinit import helpers diff --git a/tests/unittests/test_data.py b/tests/unittests/test_data.py index 68729c57..41d0dc29 100644 --- a/tests/unittests/test_data.py +++ b/tests/unittests/test_data.py @@ -20,7 +20,7 @@ from cloudinit import util INSTANCE_ID = "i-testing" -from tests.unittests import helpers +from . import helpers class FakeDataSource(sources.DataSource): diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py index ccfd672a..88c82d5e 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 tests.unittests.helpers import populate_dir +from ..helpers import populate_dir import base64 import crypt diff --git a/tests/unittests/test_datasource/test_cloudsigma.py b/tests/unittests/test_datasource/test_cloudsigma.py index eadb3cb7..306ac7d8 100644 --- a/tests/unittests/test_datasource/test_cloudsigma.py +++ b/tests/unittests/test_datasource/test_cloudsigma.py @@ -4,7 +4,7 @@ import copy from cloudinit.cs_utils import Cepko from cloudinit.sources import DataSourceCloudSigma -from tests.unittests import helpers as test_helpers +from .. import helpers as test_helpers SERVER_CONTEXT = { diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py index 4404668e..d88066e5 100644 --- a/tests/unittests/test_datasource/test_configdrive.py +++ b/tests/unittests/test_datasource/test_configdrive.py @@ -12,7 +12,7 @@ from cloudinit.sources import DataSourceConfigDrive as ds from cloudinit.sources.helpers import openstack from cloudinit import util -from tests.unittests import helpers as unit_helpers +from .. import helpers as unit_helpers PUBKEY = u'ssh-rsa AAAAB3NzaC1....sIkJhq8wdX+4I3A4cYbYP ubuntu@server-460\n' EC2_META = { diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py index 19ffb6c1..60a0ce48 100644 --- a/tests/unittests/test_datasource/test_gce.py +++ b/tests/unittests/test_datasource/test_gce.py @@ -24,7 +24,7 @@ from cloudinit import settings from cloudinit import helpers from cloudinit.sources import DataSourceGCE -from tests.unittests import helpers as test_helpers +from .. import helpers as test_helpers GCE_META = { 'instance/id': '123', diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py index 73cfadcb..c157beb8 100644 --- a/tests/unittests/test_datasource/test_maas.py +++ b/tests/unittests/test_datasource/test_maas.py @@ -3,7 +3,7 @@ import os from cloudinit.sources import DataSourceMAAS from cloudinit import url_helper -from tests.unittests.helpers import populate_dir +from ..helpers import populate_dir import mocker diff --git a/tests/unittests/test_datasource/test_nocloud.py b/tests/unittests/test_datasource/test_nocloud.py index a65833eb..14274562 100644 --- a/tests/unittests/test_datasource/test_nocloud.py +++ b/tests/unittests/test_datasource/test_nocloud.py @@ -1,7 +1,7 @@ from cloudinit import helpers from cloudinit.sources import DataSourceNoCloud from cloudinit import util -from tests.unittests.helpers import populate_dir +from ..helpers import populate_dir from mocker import MockerTestCase import os diff --git a/tests/unittests/test_datasource/test_opennebula.py b/tests/unittests/test_datasource/test_opennebula.py index ec6b752b..b4fd1f4d 100644 --- a/tests/unittests/test_datasource/test_opennebula.py +++ b/tests/unittests/test_datasource/test_opennebula.py @@ -2,7 +2,7 @@ from cloudinit import helpers from cloudinit.sources import DataSourceOpenNebula as ds from cloudinit import util from mocker import MockerTestCase -from tests.unittests.helpers import populate_dir +from ..helpers import populate_dir from base64 import b64encode import os diff --git a/tests/unittests/test_datasource/test_openstack.py b/tests/unittests/test_datasource/test_openstack.py index d29e5363..c088bb55 100644 --- a/tests/unittests/test_datasource/test_openstack.py +++ b/tests/unittests/test_datasource/test_openstack.py @@ -24,7 +24,7 @@ from StringIO import StringIO from urlparse import urlparse -from tests.unittests import helpers as test_helpers +from .. import helpers as test_helpers from cloudinit import helpers from cloudinit import settings diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index f64aea07..b197b600 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -25,7 +25,7 @@ import base64 from cloudinit import helpers as c_helpers from cloudinit.sources import DataSourceSmartOS -from tests.unittests import helpers +from .. import helpers import os import os.path import re diff --git a/tests/unittests/test_distros/test_generic.py b/tests/unittests/test_distros/test_generic.py index 7befb8c8..c24c790e 100644 --- a/tests/unittests/test_distros/test_generic.py +++ b/tests/unittests/test_distros/test_generic.py @@ -1,7 +1,7 @@ from cloudinit import distros from cloudinit import util -from tests.unittests import helpers +from .. import helpers import os diff --git a/tests/unittests/test_ec2_util.py b/tests/unittests/test_ec2_util.py index aaec2694..700254a3 100644 --- a/tests/unittests/test_ec2_util.py +++ b/tests/unittests/test_ec2_util.py @@ -1,4 +1,4 @@ -from tests.unittests import helpers +from . import helpers from cloudinit import ec2_utils as eu from cloudinit import url_helper as uh diff --git a/tests/unittests/test_filters/test_launch_index.py b/tests/unittests/test_filters/test_launch_index.py index 773bb312..2f4c2fda 100644 --- a/tests/unittests/test_filters/test_launch_index.py +++ b/tests/unittests/test_filters/test_launch_index.py @@ -1,6 +1,6 @@ import copy -from tests.unittests import helpers +from .. import helpers import itertools diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py index f2ed4597..f6dc4521 100644 --- a/tests/unittests/test_handler/test_handler_growpart.py +++ b/tests/unittests/test_handler/test_handler_growpart.py @@ -188,8 +188,8 @@ class TestResize(MockerTestCase): self.assertEqual(cc_growpart.RESIZE.SKIPPED, find(enoent[0], resized)[1]) #self.assertEqual(resize_calls, - #[("/dev/XXda", "1", "/dev/XXda1"), - #("/dev/YYda", "2", "/dev/YYda2")]) + # [("/dev/XXda", "1", "/dev/XXda1"), + # ("/dev/YYda", "2", "/dev/YYda2")]) finally: cc_growpart.device_part_info = opinfo os.stat = real_stat diff --git a/tests/unittests/test_handler/test_handler_locale.py b/tests/unittests/test_handler/test_handler_locale.py index 72ad00fd..eb251636 100644 --- a/tests/unittests/test_handler/test_handler_locale.py +++ b/tests/unittests/test_handler/test_handler_locale.py @@ -25,7 +25,7 @@ from cloudinit import util from cloudinit.sources import DataSourceNoCloud -from tests.unittests import helpers as t_help +from .. import helpers as t_help from configobj import ConfigObj diff --git a/tests/unittests/test_handler/test_handler_power_state.py b/tests/unittests/test_handler/test_handler_power_state.py index f6e37fa5..4b7b2112 100644 --- a/tests/unittests/test_handler/test_handler_power_state.py +++ b/tests/unittests/test_handler/test_handler_power_state.py @@ -1,6 +1,6 @@ from cloudinit.config import cc_power_state_change as psc -from tests.unittests import helpers as t_help +from .. import helpers as t_help class TestLoadPowerState(t_help.TestCase): diff --git a/tests/unittests/test_handler/test_handler_seed_random.py b/tests/unittests/test_handler/test_handler_seed_random.py index be2fa4a4..40481f16 100644 --- a/tests/unittests/test_handler/test_handler_seed_random.py +++ b/tests/unittests/test_handler/test_handler_seed_random.py @@ -1,4 +1,4 @@ - # Copyright (C) 2013 Hewlett-Packard Development Company, L.P. +# Copyright (C) 2013 Hewlett-Packard Development Company, L.P. # # Author: Juerg Haefliger <juerg.haefliger@hp.com> # @@ -31,7 +31,7 @@ from cloudinit import util from cloudinit.sources import DataSourceNone -from tests.unittests import helpers as t_help +from .. import helpers as t_help import logging diff --git a/tests/unittests/test_handler/test_handler_set_hostname.py b/tests/unittests/test_handler/test_handler_set_hostname.py index 6344ec0c..03004ab9 100644 --- a/tests/unittests/test_handler/test_handler_set_hostname.py +++ b/tests/unittests/test_handler/test_handler_set_hostname.py @@ -5,7 +5,7 @@ from cloudinit import distros from cloudinit import helpers from cloudinit import util -from tests.unittests import helpers as t_help +from .. import helpers as t_help import logging diff --git a/tests/unittests/test_handler/test_handler_timezone.py b/tests/unittests/test_handler/test_handler_timezone.py index 40b69773..874db340 100644 --- a/tests/unittests/test_handler/test_handler_timezone.py +++ b/tests/unittests/test_handler/test_handler_timezone.py @@ -25,7 +25,7 @@ from cloudinit import util from cloudinit.sources import DataSourceNoCloud -from tests.unittests import helpers as t_help +from .. import helpers as t_help from configobj import ConfigObj diff --git a/tests/unittests/test_handler/test_handler_yum_add_repo.py b/tests/unittests/test_handler/test_handler_yum_add_repo.py index 7c6f7c40..156441c7 100644 --- a/tests/unittests/test_handler/test_handler_yum_add_repo.py +++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py @@ -2,7 +2,7 @@ from cloudinit import util from cloudinit.config import cc_yum_add_repo -from tests.unittests import helpers +from .. import helpers import logging diff --git a/tests/unittests/test_merging.py b/tests/unittests/test_merging.py index 486b9158..17704f8e 100644 --- a/tests/unittests/test_merging.py +++ b/tests/unittests/test_merging.py @@ -1,4 +1,4 @@ -from tests.unittests import helpers +from . import helpers from cloudinit.handlers import cloud_config from cloudinit.handlers import (CONTENT_START, CONTENT_END) diff --git a/tests/unittests/test_pathprefix2dict.py b/tests/unittests/test_pathprefix2dict.py index c68c263c..590c4b82 100644 --- a/tests/unittests/test_pathprefix2dict.py +++ b/tests/unittests/test_pathprefix2dict.py @@ -1,7 +1,7 @@ from cloudinit import util from mocker import MockerTestCase -from tests.unittests.helpers import populate_dir +from .helpers import populate_dir class TestPathPrefix2Dict(MockerTestCase): diff --git a/tests/unittests/test_runs/test_merge_run.py b/tests/unittests/test_runs/test_merge_run.py index 5ffe95a2..32b41925 100644 --- a/tests/unittests/test_runs/test_merge_run.py +++ b/tests/unittests/test_runs/test_merge_run.py @@ -1,6 +1,6 @@ import os -from tests.unittests import helpers +from .. import helpers from cloudinit.settings import (PER_INSTANCE) from cloudinit import stages diff --git a/tests/unittests/test_runs/test_simple_run.py b/tests/unittests/test_runs/test_simple_run.py index 9a7178d1..c9ba949e 100644 --- a/tests/unittests/test_runs/test_simple_run.py +++ b/tests/unittests/test_runs/test_simple_run.py @@ -1,6 +1,6 @@ import os -from tests.unittests import helpers +from .. import helpers from cloudinit.settings import (PER_INSTANCE) from cloudinit import stages diff --git a/tests/unittests/test_templating.py b/tests/unittests/test_templating.py index 1ec3004b..87681f0f 100644 --- a/tests/unittests/test_templating.py +++ b/tests/unittests/test_templating.py @@ -16,7 +16,7 @@ # 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 tests.unittests import helpers as test_helpers +from . import helpers as test_helpers import textwrap from cloudinit import templater diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py index 38ab0c96..335ab730 100644 --- a/tests/unittests/test_util.py +++ b/tests/unittests/test_util.py @@ -5,7 +5,7 @@ import stat import yaml from mocker import MockerTestCase -from tests.unittests import helpers +from . import helpers from unittest import TestCase from cloudinit import importer |