summaryrefslogtreecommitdiff
path: root/tests/unittests/test_distros
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-09-24 19:27:40 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-09-24 19:27:40 -0700
commita092e6e2eaa5dc848d71f16671c61fa6014ce0b2 (patch)
tree5fc5ea5d572e3d1ccb75fdb632179d7510d55ec9 /tests/unittests/test_distros
parentdf80168450faa013ce50893e3c62979829b1fea8 (diff)
downloadvyos-cloud-init-a092e6e2eaa5dc848d71f16671c61fa6014ce0b2.tar.gz
vyos-cloud-init-a092e6e2eaa5dc848d71f16671c61fa6014ce0b2.zip
Fix pylint issues created.
Diffstat (limited to 'tests/unittests/test_distros')
-rw-r--r--tests/unittests/test_distros/test_netconfig.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py
index f2cac2fe..083ae34a 100644
--- a/tests/unittests/test_distros/test_netconfig.py
+++ b/tests/unittests/test_distros/test_netconfig.py
@@ -12,7 +12,7 @@ from cloudinit import util
from StringIO import StringIO
-BASE_NET_CFG ='''
+BASE_NET_CFG = '''
auto lo
iface lo inet loopback
@@ -53,8 +53,10 @@ class TestNetCfgDistro(MockerTestCase):
def test_simple_write_ub(self):
ub_distro = self._get_distro('ubuntu')
- util_mock = self.mocker.replace(util.write_file, spec=False, passthrough=False)
- exists_mock = self.mocker.replace(os.path.isfile, spec=False, passthrough=False)
+ util_mock = self.mocker.replace(util.write_file,
+ spec=False, passthrough=False)
+ exists_mock = self.mocker.replace(os.path.isfile,
+ spec=False, passthrough=False)
exists_mock(mocker.ARGS)
self.mocker.count(0, None)
@@ -81,9 +83,12 @@ class TestNetCfgDistro(MockerTestCase):
def test_simple_write_rh(self):
rh_distro = self._get_distro('rhel')
- write_mock = self.mocker.replace(util.write_file, spec=False, passthrough=False)
- load_mock = self.mocker.replace(util.load_file, spec=False, passthrough=False)
- exists_mock = self.mocker.replace(os.path.isfile, spec=False, passthrough=False)
+ write_mock = self.mocker.replace(util.write_file,
+ spec=False, passthrough=False)
+ load_mock = self.mocker.replace(util.load_file,
+ spec=False, passthrough=False)
+ exists_mock = self.mocker.replace(os.path.isfile,
+ spec=False, passthrough=False)
write_bufs = {}
def replace_write(filename, content, mode=0644, omode="wb"):
@@ -101,7 +106,7 @@ class TestNetCfgDistro(MockerTestCase):
self.mocker.count(0, None)
self.mocker.result('')
- for i in range(0, 3):
+ for _i in range(0, 3):
write_mock(mocker.ARGS)
self.mocker.call(replace_write)