summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler
diff options
context:
space:
mode:
authorJay Faulkner <jay@jvf.cc>2014-08-26 11:50:11 -0700
committerJay Faulkner <jay@jvf.cc>2014-08-26 11:50:11 -0700
commitb3216b56f3fea3259c290faa2dd496215b625904 (patch)
treeb88edfcb8819f27a5189891236f2edeb3b859350 /tests/unittests/test_handler
parent190cacc430900d9d2dd4dd45c59d01e30e469720 (diff)
downloadvyos-cloud-init-b3216b56f3fea3259c290faa2dd496215b625904.tar.gz
vyos-cloud-init-b3216b56f3fea3259c290faa2dd496215b625904.zip
fix(pep8): Fix various pep8 violations and version-lock pep8
Fixed all complaints from running "make pep8". Also version locked pep8 in test-requirements.txt to ensure that pep8 requirements don't change without an explicit commit.
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r--tests/unittests/test_handler/test_handler_growpart.py8
-rw-r--r--tests/unittests/test_handler/test_handler_power_state.py2
-rw-r--r--tests/unittests/test_handler/test_handler_yum_add_repo.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py
index f6dc4521..fa624197 100644
--- a/tests/unittests/test_handler/test_handler_growpart.py
+++ b/tests/unittests/test_handler/test_handler_growpart.py
@@ -53,7 +53,7 @@ class TestDisabled(MockerTestCase):
self.handle = cc_growpart.handle
def test_mode_off(self):
- #Test that nothing is done if mode is off.
+ # Test that nothing is done if mode is off.
# this really only verifies that resizer_factory isn't called
config = {'growpart': {'mode': 'off'}}
@@ -109,7 +109,7 @@ class TestConfig(MockerTestCase):
self.assertTrue(isinstance(ret, cc_growpart.ResizeGrowPart))
def test_handle_with_no_growpart_entry(self):
- #if no 'growpart' entry in config, then mode=auto should be used
+ # if no 'growpart' entry in config, then mode=auto should be used
myresizer = object()
@@ -141,7 +141,7 @@ class TestResize(MockerTestCase):
self.mocker.order()
def test_simple_devices(self):
- #test simple device list
+ # test simple device list
# this patches out devent2dev, os.stat, and device_part_info
# so in the end, doesn't test a lot
devs = ["/dev/XXda1", "/dev/YYda2"]
@@ -187,7 +187,7 @@ class TestResize(MockerTestCase):
find("/dev/YYda2", resized)[1])
self.assertEqual(cc_growpart.RESIZE.SKIPPED,
find(enoent[0], resized)[1])
- #self.assertEqual(resize_calls,
+ # self.assertEqual(resize_calls,
# [("/dev/XXda", "1", "/dev/XXda1"),
# ("/dev/YYda", "2", "/dev/YYda2")])
finally:
diff --git a/tests/unittests/test_handler/test_handler_power_state.py b/tests/unittests/test_handler/test_handler_power_state.py
index 4b7b2112..2f86b8f8 100644
--- a/tests/unittests/test_handler/test_handler_power_state.py
+++ b/tests/unittests/test_handler/test_handler_power_state.py
@@ -67,7 +67,7 @@ def check_lps_ret(psc_return, mode=None):
cmd = psc_return[0]
timeout = psc_return[1]
- if not 'shutdown' in psc_return[0][0]:
+ if 'shutdown' not in psc_return[0][0]:
errs.append("string 'shutdown' not in cmd")
if mode is not None:
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 156441c7..21b89c34 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/$basearch',
'enabled': False,
'gpgcheck': True,
'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL',