summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/__init__.py2
-rw-r--r--tests/unittests/helpers.py4
-rw-r--r--tests/unittests/test__init__.py2
-rw-r--r--tests/unittests/test_atomic_helper.py4
-rw-r--r--tests/unittests/test_builtin_handlers.py4
-rw-r--r--tests/unittests/test_cli.py5
-rw-r--r--tests/unittests/test_cs_util.py4
-rw-r--r--tests/unittests/test_data.py4
-rw-r--r--tests/unittests/test_datasource/test_aliyun.py4
-rw-r--r--tests/unittests/test_datasource/test_altcloud.py24
-rw-r--r--tests/unittests/test_datasource/test_azure.py4
-rw-r--r--tests/unittests/test_datasource/test_azure_helper.py4
-rw-r--r--tests/unittests/test_datasource/test_cloudsigma.py7
-rw-r--r--tests/unittests/test_datasource/test_cloudstack.py4
-rw-r--r--tests/unittests/test_datasource/test_common.py2
-rw-r--r--tests/unittests/test_datasource/test_configdrive.py2
-rw-r--r--tests/unittests/test_datasource/test_digitalocean.py19
-rw-r--r--tests/unittests/test_datasource/test_gce.py19
-rw-r--r--tests/unittests/test_datasource/test_maas.py2
-rw-r--r--tests/unittests/test_datasource/test_nocloud.py2
-rw-r--r--tests/unittests/test_datasource/test_opennebula.py2
-rw-r--r--tests/unittests/test_datasource/test_openstack.py20
-rw-r--r--tests/unittests/test_datasource/test_ovf.py20
-rw-r--r--tests/unittests/test_datasource/test_smartos.py33
-rw-r--r--tests/unittests/test_distros/test_create_users.py4
-rw-r--r--tests/unittests/test_distros/test_generic.py2
-rw-r--r--tests/unittests/test_distros/test_hostname.py4
-rw-r--r--tests/unittests/test_distros/test_hosts.py4
-rw-r--r--tests/unittests/test_distros/test_netconfig.py4
-rw-r--r--tests/unittests/test_distros/test_resolv.py4
-rw-r--r--tests/unittests/test_distros/test_sysconfig.py4
-rwxr-xr-xtests/unittests/test_distros/test_user_data_normalize.py4
-rw-r--r--tests/unittests/test_ec2_util.py4
-rw-r--r--tests/unittests/test_filters/test_launch_index.py4
-rw-r--r--tests/unittests/test_handler/test_handler_apt_conf_v1.py2
-rw-r--r--tests/unittests/test_handler/test_handler_apt_configure_sources_list_v1.py2
-rw-r--r--tests/unittests/test_handler/test_handler_apt_configure_sources_list_v3.py2
-rw-r--r--tests/unittests/test_handler/test_handler_apt_source_v1.py2
-rw-r--r--tests/unittests/test_handler/test_handler_apt_source_v3.py2
-rw-r--r--tests/unittests/test_handler/test_handler_ca_certs.py4
-rw-r--r--tests/unittests/test_handler/test_handler_chef.py4
-rw-r--r--tests/unittests/test_handler/test_handler_debug.py18
-rw-r--r--tests/unittests/test_handler/test_handler_disk_setup.py4
-rw-r--r--tests/unittests/test_handler/test_handler_growpart.py2
-rw-r--r--tests/unittests/test_handler/test_handler_locale.py20
-rw-r--r--tests/unittests/test_handler/test_handler_lxd.py4
-rw-r--r--tests/unittests/test_handler/test_handler_mcollective.py4
-rw-r--r--tests/unittests/test_handler/test_handler_mounts.py4
-rw-r--r--tests/unittests/test_handler/test_handler_ntp.py4
-rw-r--r--tests/unittests/test_handler/test_handler_power_state.py4
-rw-r--r--tests/unittests/test_handler/test_handler_rsyslog.py4
-rw-r--r--tests/unittests/test_handler/test_handler_seed_random.py16
-rw-r--r--tests/unittests/test_handler/test_handler_set_hostname.py4
-rw-r--r--tests/unittests/test_handler/test_handler_snappy.py4
-rw-r--r--tests/unittests/test_handler/test_handler_spacewalk.py4
-rw-r--r--tests/unittests/test_handler/test_handler_timezone.py20
-rw-r--r--tests/unittests/test_handler/test_handler_write_files.py2
-rw-r--r--tests/unittests/test_handler/test_handler_yum_add_repo.py4
-rw-r--r--tests/unittests/test_helpers.py4
-rw-r--r--tests/unittests/test_merging.py4
-rwxr-xr-xtests/unittests/test_net.py4
-rw-r--r--tests/unittests/test_pathprefix2dict.py2
-rw-r--r--tests/unittests/test_registry.py4
-rw-r--r--tests/unittests/test_reporting.py5
-rw-r--r--tests/unittests/test_rh_subscription.py16
-rw-r--r--tests/unittests/test_runs/test_merge_run.py4
-rw-r--r--tests/unittests/test_runs/test_simple_run.py4
-rw-r--r--tests/unittests/test_sshutil.py2
-rw-r--r--tests/unittests/test_templating.py20
-rw-r--r--tests/unittests/test_util.py2
-rw-r--r--tests/unittests/test_vmware_config_file.py22
71 files changed, 270 insertions, 198 deletions
diff --git a/tests/unittests/__init__.py b/tests/unittests/__init__.py
index 1b34b5af..d89ed443 100644
--- a/tests/unittests/__init__.py
+++ b/tests/unittests/__init__.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
try:
# For test cases, avoid the following UserWarning to stderr:
# You don't have the C version of NameMapper installed ...
diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py
index a73e3f61..cf3b46d2 100644
--- a/tests/unittests/helpers.py
+++ b/tests/unittests/helpers.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from __future__ import print_function
import functools
@@ -346,3 +348,5 @@ except AttributeError:
print(reason, file=sys.stderr)
return wrapper
return decorator
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test__init__.py b/tests/unittests/test__init__.py
index 0154784a..7b6f8c4e 100644
--- a/tests/unittests/test__init__.py
+++ b/tests/unittests/test__init__.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os
import shutil
import tempfile
diff --git a/tests/unittests/test_atomic_helper.py b/tests/unittests/test_atomic_helper.py
index feb81551..e170c7c3 100644
--- a/tests/unittests/test_atomic_helper.py
+++ b/tests/unittests/test_atomic_helper.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import json
import os
import stat
@@ -52,3 +54,5 @@ class TestAtomicHelper(helpers.TempDirTestCase):
def check_perms(self, path, perms):
file_stat = os.stat(path)
self.assertEqual(perms, stat.S_IMODE(file_stat.st_mode))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_builtin_handlers.py b/tests/unittests/test_builtin_handlers.py
index dea908d7..dd9d0357 100644
--- a/tests/unittests/test_builtin_handlers.py
+++ b/tests/unittests/test_builtin_handlers.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
"""Tests of the built-in user data handlers."""
import os
@@ -71,3 +73,5 @@ class TestBuiltins(test_helpers.FilesystemMockingTestCase):
mockobj.assert_called_once_with(
['initctl', 'reload-configuration'], capture=False)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_cli.py b/tests/unittests/test_cli.py
index 5fa252f7..06f366b2 100644
--- a/tests/unittests/test_cli.py
+++ b/tests/unittests/test_cli.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import six
from . import helpers as test_helpers
@@ -32,3 +34,6 @@ class TestCLI(test_helpers.FilesystemMockingTestCase):
self.assertIn('cloud-init: error: too few arguments',
self.stderr.getvalue())
self.assertEqual(2, exit_code)
+
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_cs_util.py b/tests/unittests/test_cs_util.py
index 56c9ce9e..b8f5031c 100644
--- a/tests/unittests/test_cs_util.py
+++ b/tests/unittests/test_cs_util.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from __future__ import print_function
from . import helpers as test_helpers
@@ -61,3 +63,5 @@ class CepkoResultTests(test_helpers.TestCase):
self.assertEqual('much server', result[0])
self.assertTrue('very performance' in result)
self.assertEqual(2, len(result))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_data.py b/tests/unittests/test_data.py
index 581b581a..4092d9ca 100644
--- a/tests/unittests/test_data.py
+++ b/tests/unittests/test_data.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
"""Tests for handling of userdata within cloud init."""
import gzip
@@ -610,3 +612,5 @@ class TestFetchBaseConfig(helpers.TestCase):
stages.fetch_base_config)
self.assertEqual(ret, {'key1': 'value1', 'key2': 'other2',
'key3': 'other3'})
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_aliyun.py b/tests/unittests/test_datasource/test_aliyun.py
index 6f1de072..c16d1a6e 100644
--- a/tests/unittests/test_datasource/test_aliyun.py
+++ b/tests/unittests/test_datasource/test_aliyun.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import functools
import httpretty
import os
@@ -146,3 +148,5 @@ class TestAliYunDatasource(test_helpers.HttprettyTestCase):
'ssh-key-1']}}
self.assertEqual(ay.parse_public_keys(public_keys),
public_keys['key-pair-0']['openssh-key'])
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_altcloud.py b/tests/unittests/test_datasource/test_altcloud.py
index 12966563..b0ad86ab 100644
--- a/tests/unittests/test_datasource/test_altcloud.py
+++ b/tests/unittests/test_datasource/test_altcloud.py
@@ -1,22 +1,11 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2009-2010 Canonical Ltd.
-# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
-# Copyright (C) 2012 Yahoo! Inc.
-#
-# Author: Joe VLcek <JVLcek@RedHat.com>
+# Copyright (C) 2009-2010 Canonical Ltd.
+# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
+# Copyright (C) 2012 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joe VLcek <JVLcek@RedHat.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
+
'''
This test file exercises the code in sources DataSourceAltCloud.py
'''
@@ -448,5 +437,4 @@ def force_arch(arch=None):
elif arch is None:
setattr(os, 'uname', OS_UNAME_ORIG)
-
# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py
index d5ec9f5a..8d22bb59 100644
--- a/tests/unittests/test_datasource/test_azure.py
+++ b/tests/unittests/test_datasource/test_azure.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import helpers
from cloudinit.util import b64e, decode_binary, load_file
from cloudinit.sources import DataSourceAzure
@@ -644,3 +646,5 @@ class TestReadAzureOvf(TestCase):
(_md, _ud, cfg) = DataSourceAzure.read_azure_ovf(content)
for mypk in mypklist:
self.assertIn(mypk, cfg['_pubkeys'])
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_azure_helper.py b/tests/unittests/test_datasource/test_azure_helper.py
index 64523e16..aafdebd7 100644
--- a/tests/unittests/test_datasource/test_azure_helper.py
+++ b/tests/unittests/test_datasource/test_azure_helper.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os
from cloudinit.sources.helpers import azure as azure_helper
@@ -419,3 +421,5 @@ class TestGetMetadataFromFabric(TestCase):
self.assertRaises(SentinelException,
azure_helper.get_metadata_from_fabric)
self.assertEqual(1, shim.return_value.clean_up.call_count)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_cloudsigma.py b/tests/unittests/test_datasource/test_cloudsigma.py
index a1d59c65..5997102c 100644
--- a/tests/unittests/test_datasource/test_cloudsigma.py
+++ b/tests/unittests/test_datasource/test_cloudsigma.py
@@ -1,4 +1,4 @@
-# coding: utf-8
+# This file is part of cloud-init. See LICENSE file for license information.
import copy
@@ -50,7 +50,8 @@ class DataSourceCloudSigmaTest(test_helpers.TestCase):
self.assertEqual("test_server", self.datasource.get_hostname())
self.datasource.metadata['name'] = ''
self.assertEqual("65b2fb23", self.datasource.get_hostname())
- self.datasource.metadata['name'] = u'ั‚ะตัั‚'
+ utf8_hostname = b'\xd1\x82\xd0\xb5\xd1\x81\xd1\x82'.decode('utf-8')
+ self.datasource.metadata['name'] = utf8_hostname
self.assertEqual("65b2fb23", self.datasource.get_hostname())
def test_get_public_ssh_keys(self):
@@ -112,3 +113,5 @@ class DsLoads(test_helpers.TestCase):
['CloudSigma'], (sources.DEP_FILESYSTEM,), ['cloudinit.sources'])
self.assertEqual([DataSourceCloudSigma.DataSourceCloudSigma],
found)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_cloudstack.py b/tests/unittests/test_datasource/test_cloudstack.py
index b1aab17b..e93d28de 100644
--- a/tests/unittests/test_datasource/test_cloudstack.py
+++ b/tests/unittests/test_datasource/test_cloudstack.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import helpers
from cloudinit.sources.DataSourceCloudStack import DataSourceCloudStack
@@ -76,3 +78,5 @@ class TestCloudStackPasswordFetching(TestCase):
def test_password_not_saved_if_bad_request(self):
self._check_password_not_saved_for('bad_request')
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_common.py b/tests/unittests/test_datasource/test_common.py
index d1d3f2af..c08717f3 100644
--- a/tests/unittests/test_datasource/test_common.py
+++ b/tests/unittests/test_datasource/test_common.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import settings
from cloudinit import sources
from cloudinit import type_utils
diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py
index 6e00abf4..55153357 100644
--- a/tests/unittests/test_datasource/test_configdrive.py
+++ b/tests/unittests/test_datasource/test_configdrive.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from copy import copy, deepcopy
import json
import os
diff --git a/tests/unittests/test_datasource/test_digitalocean.py b/tests/unittests/test_datasource/test_digitalocean.py
index 7bde0820..9be6bc19 100644
--- a/tests/unittests/test_datasource/test_digitalocean.py
+++ b/tests/unittests/test_datasource/test_digitalocean.py
@@ -1,19 +1,8 @@
+# Copyright (C) 2014 Neal Shrader
#
-# Copyright (C) 2014 Neal Shrader
+# Author: Neal Shrader <neal@digitalocean.com>
#
-# Author: Neal Shrader <neal@digitalocean.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
import json
@@ -330,3 +319,5 @@ class TestNetworkConvert(TestCase):
self.assertEqual(
sorted(['45.55.249.133', '10.17.0.5']),
sorted([i['address'] for i in eth0['subnets']]))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py
index 6e62a4d2..4f667678 100644
--- a/tests/unittests/test_datasource/test_gce.py
+++ b/tests/unittests/test_datasource/test_gce.py
@@ -1,19 +1,8 @@
+# Copyright (C) 2014 Vaidas Jablonskis
#
-# Copyright (C) 2014 Vaidas Jablonskis
+# Author: Vaidas Jablonskis <jablonskis@gmail.com>
#
-# Author: Vaidas Jablonskis <jablonskis@gmail.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
import re
@@ -164,3 +153,5 @@ class TestDataSourceGCE(test_helpers.HttprettyTestCase):
_set_mock_metadata()
self.ds.get_data()
self.assertEqual('bar', self.ds.availability_zone)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py
index 0126c883..693882d2 100644
--- a/tests/unittests/test_datasource/test_maas.py
+++ b/tests/unittests/test_datasource/test_maas.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from copy import copy
import os
import shutil
diff --git a/tests/unittests/test_datasource/test_nocloud.py b/tests/unittests/test_datasource/test_nocloud.py
index f6a46ce9..ff294395 100644
--- a/tests/unittests/test_datasource/test_nocloud.py
+++ b/tests/unittests/test_datasource/test_nocloud.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import helpers
from cloudinit.sources import DataSourceNoCloud
from cloudinit import util
diff --git a/tests/unittests/test_datasource/test_opennebula.py b/tests/unittests/test_datasource/test_opennebula.py
index ce5b5550..a266e952 100644
--- a/tests/unittests/test_datasource/test_opennebula.py
+++ b/tests/unittests/test_datasource/test_opennebula.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import helpers
from cloudinit.sources import DataSourceOpenNebula as ds
from cloudinit import util
diff --git a/tests/unittests/test_datasource/test_openstack.py b/tests/unittests/test_datasource/test_openstack.py
index 125c6d6e..e5b6fcc6 100644
--- a/tests/unittests/test_datasource/test_openstack.py
+++ b/tests/unittests/test_datasource/test_openstack.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2014 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2014 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
import copy
import json
@@ -344,3 +332,5 @@ class TestVendorDataLoading(test_helpers.TestCase):
def test_vd_load_dict_ci_list(self):
data = {'foo': 'bar', 'cloud-init': ['VD_1', 'VD_2']}
self.assertEqual(self.cvj(data), data['cloud-init'])
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_ovf.py b/tests/unittests/test_datasource/test_ovf.py
index 5f8e7e44..3e09510c 100644
--- a/tests/unittests/test_datasource/test_ovf.py
+++ b/tests/unittests/test_datasource/test_ovf.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2016 Canonical Ltd.
-#
-# Author: Scott Moser <scott.moser@canonical.com>
+# Copyright (C) 2016 Canonical Ltd.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Scott Moser <scott.moser@canonical.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
import base64
@@ -81,3 +69,5 @@ class TestReadOvfEnv(test_helpers.TestCase):
self.assertEqual({"instance-id": "inst-001"}, md)
self.assertEqual({'password': "passw0rd"}, cfg)
self.assertEqual(None, ud)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py
index 0532f986..e3c99bbb 100644
--- a/tests/unittests/test_datasource/test_smartos.py
+++ b/tests/unittests/test_datasource/test_smartos.py
@@ -1,26 +1,15 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2013 Canonical Ltd.
-#
-# Author: Ben Howard <ben.howard@canonical.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Copyright (C) 2013 Canonical Ltd.
#
+# Author: Ben Howard <ben.howard@canonical.com>
#
-# This is a testcase for the SmartOS datasource. It replicates a serial
-# console and acts like the SmartOS console does in order to validate
-# return responses.
-#
+# This file is part of cloud-init. See LICENSE file for license information.
+
+'''This is a testcase for the SmartOS datasource.
+
+It replicates a serial console and acts like the SmartOS console does in
+order to validate return responses.
+
+'''
from __future__ import print_function
@@ -881,3 +870,5 @@ class TestNetworkConversion(TestCase):
'type': 'static'}]}]}
found = convert_net(SDC_NICS_SINGLE_GATEWAY)
self.assertEqual(expected, found)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_create_users.py b/tests/unittests/test_distros/test_create_users.py
index 01a49f48..9ded4f6c 100644
--- a/tests/unittests/test_distros/test_create_users.py
+++ b/tests/unittests/test_distros/test_create_users.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import distros
from ..helpers import (TestCase, mock)
@@ -145,3 +147,5 @@ class TestCreateUser(TestCase):
self._useradd2call([user, '--groups', 'group1,group2', '-m']),
mock.call(['passwd', '-l', user])]
self.assertEqual(m_subp.call_args_list, expected)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_generic.py b/tests/unittests/test_distros/test_generic.py
index 24ad115f..c9be277e 100644
--- a/tests/unittests/test_distros/test_generic.py
+++ b/tests/unittests/test_distros/test_generic.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import distros
from cloudinit import util
diff --git a/tests/unittests/test_distros/test_hostname.py b/tests/unittests/test_distros/test_hostname.py
index 5f28a868..f6d4dbe5 100644
--- a/tests/unittests/test_distros/test_hostname.py
+++ b/tests/unittests/test_distros/test_hostname.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import unittest
from cloudinit.distros.parsers import hostname
@@ -36,3 +38,5 @@ class TestHostnameHelper(unittest.TestCase):
bbbbd
'''
self.assertEqual(str(hn).strip(), expected_out.strip())
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_hosts.py b/tests/unittests/test_distros/test_hosts.py
index ab867c6f..8aaa6e48 100644
--- a/tests/unittests/test_distros/test_hosts.py
+++ b/tests/unittests/test_distros/test_hosts.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import unittest
from cloudinit.distros.parsers import hosts
@@ -39,3 +41,5 @@ class TestHostsHelper(unittest.TestCase):
eh.del_entries('127.0.0.0')
self.assertEqual(eh.get_entry('127.0.0.0'), [])
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py
index 36eae2dc..bde3bb50 100644
--- a/tests/unittests/test_distros/test_netconfig.py
+++ b/tests/unittests/test_distros/test_netconfig.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os
from six import StringIO
@@ -379,3 +381,5 @@ ifconfig_vtnet0="DHCP"
'''
self.assertCfgEquals(expected_buf, str(write_buf))
self.assertEqual(write_buf.mode, 0o644)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_resolv.py b/tests/unittests/test_distros/test_resolv.py
index 9402b5ea..6b535a95 100644
--- a/tests/unittests/test_distros/test_resolv.py
+++ b/tests/unittests/test_distros/test_resolv.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.distros.parsers import resolv_conf
from cloudinit.distros import rhel_util
@@ -65,3 +67,5 @@ class TestResolvHelper(TestCase):
self.assertEqual(len(rp.search_domains), 6)
self.assertRaises(ValueError, rp.add_search_domain, 'bbb5.y.com')
self.assertEqual(len(rp.search_domains), 6)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_sysconfig.py b/tests/unittests/test_distros/test_sysconfig.py
index 8cb55522..235ecebb 100644
--- a/tests/unittests/test_distros/test_sysconfig.py
+++ b/tests/unittests/test_distros/test_sysconfig.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import re
from cloudinit.distros.parsers.sys_conf import SysConf
@@ -80,3 +82,5 @@ USEMD5=no'''
contents = str(conf)
self.assertIn("Z=d", contents)
self.assertIn("BLAH=b", contents)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_distros/test_user_data_normalize.py b/tests/unittests/test_distros/test_user_data_normalize.py
index 33bf922d..88746e0a 100755
--- a/tests/unittests/test_distros/test_user_data_normalize.py
+++ b/tests/unittests/test_distros/test_user_data_normalize.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import distros
from cloudinit.distros import ug_util
from cloudinit import helpers
@@ -361,3 +363,5 @@ class TestUGNormalize(TestCase):
mock_subp.assert_any_call(groupcmd)
mock_subp.assert_any_call(addcmd, logstring=addcmd)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_ec2_util.py b/tests/unittests/test_ec2_util.py
index d6cf17fa..4a33d747 100644
--- a/tests/unittests/test_ec2_util.py
+++ b/tests/unittests/test_ec2_util.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from . import helpers
from cloudinit import ec2_utils as eu
@@ -137,3 +139,5 @@ class TestEc2Util(helpers.HttprettyTestCase):
self.assertEqual(2, len(bdm))
self.assertEqual(bdm['ami'], 'sdb')
self.assertEqual(bdm['ephemeral0'], 'sdc')
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_filters/test_launch_index.py b/tests/unittests/test_filters/test_launch_index.py
index 395713e6..13137f6d 100644
--- a/tests/unittests/test_filters/test_launch_index.py
+++ b/tests/unittests/test_filters/test_launch_index.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import copy
from .. import helpers
@@ -130,3 +132,5 @@ class TestLaunchFilter(helpers.ResourceUsingTestCase):
'1': 2,
}
self.assertCounts(message, expected_counts)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_apt_conf_v1.py b/tests/unittests/test_handler/test_handler_apt_conf_v1.py
index 64acc3e0..554277ff 100644
--- a/tests/unittests/test_handler/test_handler_apt_conf_v1.py
+++ b/tests/unittests/test_handler/test_handler_apt_conf_v1.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config import cc_apt_configure
from cloudinit import util
diff --git a/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v1.py b/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v1.py
index f4411869..f53ddbb2 100644
--- a/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v1.py
+++ b/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v1.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
""" test_handler_apt_configure_sources_list
Test templating of sources list
"""
diff --git a/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v3.py b/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v3.py
index e53b0450..24e45233 100644
--- a/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v3.py
+++ b/tests/unittests/test_handler/test_handler_apt_configure_sources_list_v3.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
""" test_apt_custom_sources_list
Test templating of custom sources list
"""
diff --git a/tests/unittests/test_handler/test_handler_apt_source_v1.py b/tests/unittests/test_handler/test_handler_apt_source_v1.py
index ddff4341..12502d05 100644
--- a/tests/unittests/test_handler/test_handler_apt_source_v1.py
+++ b/tests/unittests/test_handler/test_handler_apt_source_v1.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
""" test_handler_apt_source_v1
Testing various config variations of the apt_source config
This calls all things with v1 format to stress the conversion code on top of
diff --git a/tests/unittests/test_handler/test_handler_apt_source_v3.py b/tests/unittests/test_handler/test_handler_apt_source_v3.py
index b92a50d7..292d3f59 100644
--- a/tests/unittests/test_handler/test_handler_apt_source_v3.py
+++ b/tests/unittests/test_handler/test_handler_apt_source_v3.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
"""test_handler_apt_source_v3
Testing various config variations of the apt_source custom config
This tries to call all in the new v3 format and cares about new features
diff --git a/tests/unittests/test_handler/test_handler_ca_certs.py b/tests/unittests/test_handler/test_handler_ca_certs.py
index 5e771731..7cee2c3f 100644
--- a/tests/unittests/test_handler/test_handler_ca_certs.py
+++ b/tests/unittests/test_handler/test_handler_ca_certs.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import cloud
from cloudinit.config import cc_ca_certs
from cloudinit import helpers
@@ -269,3 +271,5 @@ class TestRemoveDefaultCaCerts(TestCase):
mock_subp.assert_called_once_with(
('debconf-set-selections', '-'),
"ca-certificates ca-certificates/trust_new_crts select no")
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_chef.py b/tests/unittests/test_handler/test_handler_chef.py
index 7a1bc317..6a152ea2 100644
--- a/tests/unittests/test_handler/test_handler_chef.py
+++ b/tests/unittests/test_handler/test_handler_chef.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import json
import logging
import os
@@ -190,3 +192,5 @@ class TestChef(t_help.FilesystemMockingTestCase):
self.assertIn(v_path, content)
util.load_file(v_path)
self.assertEqual(expected_cert, util.load_file(v_path))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_debug.py b/tests/unittests/test_handler/test_handler_debug.py
index 80708d7b..929f786e 100644
--- a/tests/unittests/test_handler/test_handler_debug.py
+++ b/tests/unittests/test_handler/test_handler_debug.py
@@ -1,18 +1,6 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2014 Yahoo! Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Copyright (C) 2014 Yahoo! Inc.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from cloudinit.config import cc_debug
@@ -79,3 +67,5 @@ class TestDebug(t_help.FilesystemMockingTestCase):
cc_debug.handle('cc_debug', cfg, cc, LOG, [])
self.assertRaises(IOError,
util.load_file, '/var/log/cloud-init-debug.log')
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_disk_setup.py b/tests/unittests/test_handler/test_handler_disk_setup.py
index 3c54cf89..227f0497 100644
--- a/tests/unittests/test_handler/test_handler_disk_setup.py
+++ b/tests/unittests/test_handler/test_handler_disk_setup.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import random
from cloudinit.config import cc_disk_setup
@@ -100,3 +102,5 @@ class TestGetPartitionMbrLayout(TestCase):
self.assertEqual(
',{0},83\n,,82'.format(expected_partition_size),
cc_disk_setup.get_partition_mbr_layout(disk_size, [33, [66, 82]]))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py
index e28067de..c5fc8c9b 100644
--- a/tests/unittests/test_handler/test_handler_growpart.py
+++ b/tests/unittests/test_handler/test_handler_growpart.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import cloud
from cloudinit.config import cc_growpart
from cloudinit import util
diff --git a/tests/unittests/test_handler/test_handler_locale.py b/tests/unittests/test_handler/test_handler_locale.py
index c91908f4..e9a810c5 100644
--- a/tests/unittests/test_handler/test_handler_locale.py
+++ b/tests/unittests/test_handler/test_handler_locale.py
@@ -1,20 +1,8 @@
-# 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>
+# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
-# Based on test_handler_set_hostname.py
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from cloudinit.config import cc_locale
@@ -65,3 +53,5 @@ class TestLocale(t_help.FilesystemMockingTestCase):
contents = util.load_file('/etc/sysconfig/language', decode=False)
n_cfg = ConfigObj(BytesIO(contents))
self.assertEqual({'RC_LANG': cfg['locale']}, dict(n_cfg))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_lxd.py b/tests/unittests/test_handler/test_handler_lxd.py
index 14366a10..351226bf 100644
--- a/tests/unittests/test_handler/test_handler_lxd.py
+++ b/tests/unittests/test_handler/test_handler_lxd.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config import cc_lxd
from cloudinit.sources import DataSourceNoCloud
from cloudinit import (distros, helpers, cloud)
@@ -183,3 +185,5 @@ class TestLxd(t_help.TestCase):
self.assertEqual(
cc_lxd.bridge_to_cmd(data),
(None, None))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_mcollective.py b/tests/unittests/test_handler/test_handler_mcollective.py
index c3a5a634..2a9f3823 100644
--- a/tests/unittests/test_handler/test_handler_mcollective.py
+++ b/tests/unittests/test_handler/test_handler_mcollective.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import (cloud, distros, helpers, util)
from cloudinit.config import cc_mcollective
from cloudinit.sources import DataSourceNoCloud
@@ -148,3 +150,5 @@ class TestHandler(t_help.TestCase):
self.assertTrue(mock_util.subp.called)
self.assertEqual(mock_util.subp.call_args_list[0][0][0],
['service', 'mcollective', 'restart'])
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_mounts.py b/tests/unittests/test_handler/test_handler_mounts.py
index 355674b2..650ca0ec 100644
--- a/tests/unittests/test_handler/test_handler_mounts.py
+++ b/tests/unittests/test_handler/test_handler_mounts.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os.path
import shutil
import tempfile
@@ -131,3 +133,5 @@ class TestSanitizeDevname(test_helpers.FilesystemMockingTestCase):
self.assertIsNone(
cc_mounts.sanitize_devname(
'ephemeral0.1', lambda x: disk_path, mock.Mock()))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_ntp.py b/tests/unittests/test_handler/test_handler_ntp.py
index 1c7bb06a..ec600077 100644
--- a/tests/unittests/test_handler/test_handler_ntp.py
+++ b/tests/unittests/test_handler/test_handler_ntp.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config import cc_ntp
from cloudinit.sources import DataSourceNone
from cloudinit import templater
@@ -272,3 +274,5 @@ class TestNtp(FilesystemMockingTestCase):
cc_ntp.handle('cc_ntp', {}, cc, LOG, [])
self.assertFalse(cc.distro.install_packages.called)
self.assertFalse(mock_util.subp.called)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_power_state.py b/tests/unittests/test_handler/test_handler_power_state.py
index feff319d..3fd0069d 100644
--- a/tests/unittests/test_handler/test_handler_power_state.py
+++ b/tests/unittests/test_handler/test_handler_power_state.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import sys
from cloudinit.config import cc_power_state_change as psc
@@ -125,3 +127,5 @@ def check_lps_ret(psc_return, mode=None):
if len(errs):
lines = ["Errors in result: %s" % str(psc_return)] + errs
raise Exception('\n'.join(lines))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_rsyslog.py b/tests/unittests/test_handler/test_handler_rsyslog.py
index 38636063..cca06678 100644
--- a/tests/unittests/test_handler/test_handler_rsyslog.py
+++ b/tests/unittests/test_handler/test_handler_rsyslog.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os
import shutil
import tempfile
@@ -172,3 +174,5 @@ class TestRemotesToSyslog(t_help.TestCase):
lines = r.splitlines()
self.assertEqual(1, len(lines))
self.assertTrue(myline in r.splitlines())
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_seed_random.py b/tests/unittests/test_handler/test_handler_seed_random.py
index a0390da9..e5e607fb 100644
--- a/tests/unittests/test_handler/test_handler_seed_random.py
+++ b/tests/unittests/test_handler/test_handler_seed_random.py
@@ -1,20 +1,12 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
# Based on test_handler_set_hostname.py
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from cloudinit.config import cc_seed_random
@@ -225,3 +217,5 @@ def apply_patches(patches):
setattr(ref, name, replace)
ret.append((ref, name, orig))
return ret
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_set_hostname.py b/tests/unittests/test_handler/test_handler_set_hostname.py
index 7effa124..4b18de75 100644
--- a/tests/unittests/test_handler/test_handler_set_hostname.py
+++ b/tests/unittests/test_handler/test_handler_set_hostname.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config import cc_set_hostname
from cloudinit import cloud
@@ -70,3 +72,5 @@ class TestHostname(t_help.FilesystemMockingTestCase):
cc_set_hostname.handle('cc_set_hostname', cfg, cc, LOG, [])
contents = util.load_file("/etc/HOSTNAME")
self.assertEqual('blah', contents.strip())
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_snappy.py b/tests/unittests/test_handler/test_handler_snappy.py
index e320dd82..edb73d6d 100644
--- a/tests/unittests/test_handler/test_handler_snappy.py
+++ b/tests/unittests/test_handler/test_handler_snappy.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config.cc_snappy import (
makeop, get_package_ops, render_snap_op)
from cloudinit.config.cc_snap_config import (
@@ -595,3 +597,5 @@ def apply_patches(patches):
setattr(ref, name, replace)
ret.append((ref, name, orig))
return ret
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_spacewalk.py b/tests/unittests/test_handler/test_handler_spacewalk.py
index 44f95e4c..28b5892a 100644
--- a/tests/unittests/test_handler/test_handler_spacewalk.py
+++ b/tests/unittests/test_handler/test_handler_spacewalk.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config import cc_spacewalk
from cloudinit import util
@@ -40,3 +42,5 @@ class TestSpacewalk(helpers.TestCase):
'--profilename', 'test',
'--sslCACert', cc_spacewalk.def_ca_cert_path,
], capture=False)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_timezone.py b/tests/unittests/test_handler/test_handler_timezone.py
index b7e6b03d..c30fbdfe 100644
--- a/tests/unittests/test_handler/test_handler_timezone.py
+++ b/tests/unittests/test_handler/test_handler_timezone.py
@@ -1,20 +1,8 @@
-# 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>
+# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
-# Based on test_handler_set_hostname.py
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from cloudinit.config import cc_timezone
@@ -74,3 +62,5 @@ class TestTimezone(t_help.FilesystemMockingTestCase):
contents = util.load_file('/etc/localtime')
self.assertEqual(dummy_contents, contents.strip())
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_handler/test_handler_write_files.py b/tests/unittests/test_handler/test_handler_write_files.py
index 466e45f8..fb252d1d 100644
--- a/tests/unittests/test_handler/test_handler_write_files.py
+++ b/tests/unittests/test_handler/test_handler_write_files.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config.cc_write_files import write_files
from cloudinit import log as logging
from cloudinit import util
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 28b060f8..3feba86c 100644
--- a/tests/unittests/test_handler/test_handler_yum_add_repo.py
+++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.config import cc_yum_add_repo
from cloudinit import util
@@ -66,3 +68,5 @@ class TestConfig(helpers.FilesystemMockingTestCase):
}
}
self.assertEqual(expected, dict(contents))
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_helpers.py b/tests/unittests/test_helpers.py
index 943a5723..955f8dfa 100644
--- a/tests/unittests/test_helpers.py
+++ b/tests/unittests/test_helpers.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
"""Tests of the built-in user data handlers."""
import os
@@ -31,3 +33,5 @@ class TestPaths(test_helpers.ResourceUsingTestCase):
mypaths = self.getCloudPaths(myds)
self.assertEqual(None, mypaths.get_ipath())
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_merging.py b/tests/unittests/test_merging.py
index a33ec184..0658b6b4 100644
--- a/tests/unittests/test_merging.py
+++ b/tests/unittests/test_merging.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from . import helpers
from cloudinit.handlers import cloud_config
@@ -255,3 +257,5 @@ class TestSimpleRun(helpers.ResourceUsingTestCase):
c = _old_mergedict(a, b)
d = util.mergemanydict([a, b])
self.assertEqual(c, d)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index 3242c19e..1090282a 100755
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import net
from cloudinit.net import cmdline
from cloudinit.net import eni
@@ -822,3 +824,5 @@ def _gzip_data(data):
gzfp.write(data)
gzfp.close()
return iobuf.getvalue()
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_pathprefix2dict.py b/tests/unittests/test_pathprefix2dict.py
index 38fd75b6..a4ae284f 100644
--- a/tests/unittests/test_pathprefix2dict.py
+++ b/tests/unittests/test_pathprefix2dict.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit import util
from .helpers import TestCase, populate_dir
diff --git a/tests/unittests/test_registry.py b/tests/unittests/test_registry.py
index bcf01475..acf0bf4f 100644
--- a/tests/unittests/test_registry.py
+++ b/tests/unittests/test_registry.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from cloudinit.registry import DictRegistry
from .helpers import (mock, TestCase)
@@ -26,3 +28,5 @@ class TestDictRegistry(TestCase):
registry.register_item(item_key, mock.Mock())
self.assertRaises(ValueError,
registry.register_item, item_key, mock.Mock())
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_reporting.py b/tests/unittests/test_reporting.py
index 20ca23df..f3b8f992 100644
--- a/tests/unittests/test_reporting.py
+++ b/tests/unittests/test_reporting.py
@@ -1,7 +1,6 @@
# Copyright 2015 Canonical Ltd.
-# This file is part of cloud-init. See LICENCE file for license information.
#
-# vi: ts=4 expandtab
+# This file is part of cloud-init. See LICENSE file for license information.
from cloudinit import reporting
from cloudinit.reporting import events
@@ -369,3 +368,5 @@ class TestReportingEventStack(TestCase):
class TestStatusAccess(TestCase):
def test_invalid_status_access_raises_value_error(self):
self.assertRaises(AttributeError, getattr, events.status, "BOGUS")
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_rh_subscription.py b/tests/unittests/test_rh_subscription.py
index 0c12cacf..ca14cd46 100644
--- a/tests/unittests/test_rh_subscription.py
+++ b/tests/unittests/test_rh_subscription.py
@@ -1,14 +1,6 @@
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
+
+"""Tests for registering RHEL subscription via rh_subscription."""
import logging
@@ -224,3 +216,5 @@ class TestBadInput(TestCase):
self.SM._sub_man_cli.assert_called_with(['identity'])
self.assertEqual(self.SM.log_warn.call_count, 4)
self.assertEqual(self.SM._sub_man_cli.call_count, 1)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_runs/test_merge_run.py b/tests/unittests/test_runs/test_merge_run.py
index ce43798e..65895273 100644
--- a/tests/unittests/test_runs/test_merge_run.py
+++ b/tests/unittests/test_runs/test_merge_run.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os
import shutil
import tempfile
@@ -52,3 +54,5 @@ class TestMergeRun(helpers.FilesystemMockingTestCase):
self.assertIn('write-files', which_ran)
contents = util.load_file('/etc/blah.ini')
self.assertEqual(contents, 'blah')
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_runs/test_simple_run.py b/tests/unittests/test_runs/test_simple_run.py
index 07e7b1a8..31324204 100644
--- a/tests/unittests/test_runs/test_simple_run.py
+++ b/tests/unittests/test_runs/test_simple_run.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
import os
import shutil
import tempfile
@@ -79,3 +81,5 @@ class TestSimpleRun(helpers.FilesystemMockingTestCase):
self.assertIn('write-files', which_ran)
contents = util.load_file('/etc/blah.ini')
self.assertEqual(contents, 'blah')
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_sshutil.py b/tests/unittests/test_sshutil.py
index 9aeb1cde..55971b5e 100644
--- a/tests/unittests/test_sshutil.py
+++ b/tests/unittests/test_sshutil.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from mock import patch
from . import helpers as test_helpers
diff --git a/tests/unittests/test_templating.py b/tests/unittests/test_templating.py
index 94b6e061..4e627826 100644
--- a/tests/unittests/test_templating.py
+++ b/tests/unittests/test_templating.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2014 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2014 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from __future__ import print_function
@@ -117,3 +105,5 @@ $a,$b'''
{'mirror': mirror,
'codename': codename})
self.assertEqual(ex_data, out_data)
+
+# vi: ts=4 expandtab
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index 4df1c912..ab74311e 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -1,3 +1,5 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
from __future__ import print_function
import logging
diff --git a/tests/unittests/test_vmware_config_file.py b/tests/unittests/test_vmware_config_file.py
index d5c7367b..18475f10 100644
--- a/tests/unittests/test_vmware_config_file.py
+++ b/tests/unittests/test_vmware_config_file.py
@@ -1,21 +1,9 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2015 Canonical Ltd.
-# Copyright (C) 2016 VMware INC.
-#
-# Author: Sankar Tanguturi <stanguturi@vmware.com>
+# Copyright (C) 2015 Canonical Ltd.
+# Copyright (C) 2016 VMware INC.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Sankar Tanguturi <stanguturi@vmware.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
import logging
import sys
@@ -101,3 +89,5 @@ class TestVmwareConfigFile(unittest.TestCase):
self.assertEqual('NIC1', nics[0].name, "nic0")
self.assertEqual('00:50:56:a6:8c:08', nics[0].mac, "mac0")
self.assertEqual(BootProtoEnum.DHCP, nics[0].bootProto, "bootproto0")
+
+# vi: ts=4 expandtab