diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-01-06 12:02:38 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-01-06 12:02:38 -0500 |
commit | 38c851e58e09c5574661ef4b2d2e66f6e38063d1 (patch) | |
tree | d136c739ba324802e90b7afede5429254e519475 /tests | |
parent | fa5ce8c40621c78e61c7d9bd073903101f7d6a5e (diff) | |
download | vyos-cloud-init-38c851e58e09c5574661ef4b2d2e66f6e38063d1.tar.gz vyos-cloud-init-38c851e58e09c5574661ef4b2d2e66f6e38063d1.zip |
tools/run-pep8: remove leading ',' fed to --ignore
--ignore was being called with ',E121,E...' rather than
'E121,E...'.
that resulted in odd behavior, missing the pep8 errors that are fixed
here.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_datasource/test_digitalocean.py | 1 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_gce.py | 3 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_distros/test_netconfig.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_handler/test_handler_yum_add_repo.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_templating.py | 3 |
6 files changed, 8 insertions, 7 deletions
diff --git a/tests/unittests/test_datasource/test_digitalocean.py b/tests/unittests/test_datasource/test_digitalocean.py index 04bee340..d1270fc2 100644 --- a/tests/unittests/test_datasource/test_digitalocean.py +++ b/tests/unittests/test_datasource/test_digitalocean.py @@ -51,6 +51,7 @@ DO_META = { MD_URL_RE = re.compile(r'http://169.254.169.254/metadata/v1/.*') + def _request_callback(method, uri, headers): url_path = urlparse(uri).path if url_path.startswith('/metadata/v1/'): diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py index 60a0ce48..842a72ba 100644 --- a/tests/unittests/test_datasource/test_gce.py +++ b/tests/unittests/test_datasource/test_gce.py @@ -40,7 +40,8 @@ GCE_META_PARTIAL = { } HEADERS = {'X-Google-Metadata-Request': 'True'} -MD_URL_RE = re.compile(r'http://metadata.google.internal./computeMetadata/v1/.*') +MD_URL_RE = re.compile( + r'http://metadata.google.internal./computeMetadata/v1/.*') def _request_callback(method, uri, headers): diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index b197b600..65675106 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -342,8 +342,8 @@ class TestSmartOSDataSource(helpers.FilesystemMockingTestCase): """ User-data in the SmartOS world is supposed to be written to a file each and every boot. This tests to make sure that in the event the - legacy user-data is removed, the existing user-data is backed-up and - there is no /var/db/user-data left. + legacy user-data is removed, the existing user-data is backed-up + and there is no /var/db/user-data left. """ user_data_f = "%s/mdata-user-data" % self.legacy_user_d diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py index dbbf9617..193338e8 100644 --- a/tests/unittests/test_distros/test_netconfig.py +++ b/tests/unittests/test_distros/test_netconfig.py @@ -294,7 +294,6 @@ IPV6_AUTOCONF=no self.assertCfgEquals(expected_buf, str(write_buf)) self.assertEquals(write_buf.mode, 0644) - def test_simple_write_freebsd(self): fbsd_distro = self._get_distro('freebsd') util_mock = self.mocker.replace(util.write_file, @@ -357,4 +356,3 @@ defaultrouter="192.168.1.254" ''' self.assertCfgEquals(expected_buf, str(write_buf)) self.assertEquals(write_buf.mode, 0644) - 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 21b89c34..435c9787 100644 --- a/tests/unittests/test_handler/test_handler_yum_add_repo.py +++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py @@ -24,7 +24,7 @@ class TestConfig(helpers.FilesystemMockingTestCase): 'epel-testing': { 'name': 'Extra Packages for Enterprise Linux 5 - Testing', # Missing this should cause the repo not to be written - # 'baseurl': 'http://blah.org/pub/epel/testing/5/$basearch', + # 'baseurl': 'http://blah.org/pub/epel/testing/5/$barch', 'enabled': False, 'gpgcheck': True, 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL', diff --git a/tests/unittests/test_templating.py b/tests/unittests/test_templating.py index 87681f0f..3ba4ed8a 100644 --- a/tests/unittests/test_templating.py +++ b/tests/unittests/test_templating.py @@ -100,7 +100,8 @@ $a,$b''' mirror = "mymirror" codename = "zany" in_data = "deb $mirror $codename-updates main contrib non-free" - ex_data = "deb %s %s-updates main contrib non-free" % (mirror, codename) + ex_data = "deb %s %s-updates main contrib non-free" % (mirror, + codename) out_data = templater.basic_render(in_data, {'mirror': mirror, 'codename': codename}) |