summaryrefslogtreecommitdiff
path: root/cloudinit/tests
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-04-19 21:30:08 -0600
committerChad Smith <chad.smith@canonical.com>2018-04-19 21:30:08 -0600
commit1081962eacf2814fea6f4fa3255c530de14e4a24 (patch)
tree5025c02d1215a9c0716c28499f1a9c3ee4c3e35b /cloudinit/tests
parent53f3f551f8e5d3d86c428bc51161a7842dfe06f9 (diff)
downloadvyos-cloud-init-1081962eacf2814fea6f4fa3255c530de14e4a24.tar.gz
vyos-cloud-init-1081962eacf2814fea6f4fa3255c530de14e4a24.zip
pylint: pay attention to unused variable warnings.
This enables warnings produced by pylint for unused variables (W0612), and fixes the existing errors.
Diffstat (limited to 'cloudinit/tests')
-rw-r--r--cloudinit/tests/helpers.py2
-rw-r--r--cloudinit/tests/test_util.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
index 82fd347b..5aada6e7 100644
--- a/cloudinit/tests/helpers.py
+++ b/cloudinit/tests/helpers.py
@@ -334,7 +334,7 @@ def dir2dict(startdir, prefix=None):
flist = {}
if prefix is None:
prefix = startdir
- for root, dirs, files in os.walk(startdir):
+ for root, _dirs, files in os.walk(startdir):
for fname in files:
fpath = os.path.join(root, fname)
key = fpath[len(prefix):]
diff --git a/cloudinit/tests/test_util.py b/cloudinit/tests/test_util.py
index 3f37dbb6..76eed076 100644
--- a/cloudinit/tests/test_util.py
+++ b/cloudinit/tests/test_util.py
@@ -135,7 +135,7 @@ class TestGetHostnameFqdn(CiTestCase):
def test_get_hostname_fqdn_from_passes_metadata_only_to_cloud(self):
"""Calls to cloud.get_hostname pass the metadata_only parameter."""
mycloud = FakeCloud('cloudhost', 'cloudhost.mycloud.com')
- hostname, fqdn = util.get_hostname_fqdn(
+ _hn, _fqdn = util.get_hostname_fqdn(
cfg={}, cloud=mycloud, metadata_only=True)
self.assertEqual(
[{'fqdn': True, 'metadata_only': True},