diff options
author | Joshua Powers <josh.powers@canonical.com> | 2020-06-01 14:20:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 17:20:39 -0400 |
commit | 4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1 (patch) | |
tree | c60b8f1d4ca9735efee890042b9d32ab6bc51f7d /tests/unittests/test_datasource | |
parent | 1211ab449bdfa34b8883c7386772155e6a516ebb (diff) | |
download | vyos-cloud-init-4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1.tar.gz vyos-cloud-init-4ab3303ec4bb49f029b7821d6dba53a6b02b6dc1.zip |
test: fix all flake8 E741 errors (#401)
This removes the use of variables named ‘l’, ‘O’, or ‘I’. Generally
these are used in list comprehension to read the line of lines.
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r-- | tests/unittests/test_datasource/test_ec2.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_ovf.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/unittests/test_datasource/test_ec2.py b/tests/unittests/test_datasource/test_ec2.py index d413d1cd..ad1ea595 100644 --- a/tests/unittests/test_datasource/test_ec2.py +++ b/tests/unittests/test_datasource/test_ec2.py @@ -612,7 +612,9 @@ class TestEc2(test_helpers.HttprettyTestCase): for log in expected_logs: self.assertIn(log, logs) self.assertEqual( - 1, len([l for l in logs.splitlines() if failed_put_log in l])) + 1, + len([line for line in logs.splitlines() if failed_put_log in line]) + ) def test_aws_token_redacted(self): """Verify that aws tokens are redacted when logged.""" diff --git a/tests/unittests/test_datasource/test_ovf.py b/tests/unittests/test_datasource/test_ovf.py index a19c35c8..486a2345 100644 --- a/tests/unittests/test_datasource/test_ovf.py +++ b/tests/unittests/test_datasource/test_ovf.py @@ -48,7 +48,7 @@ def fill_properties(props, template=OVF_ENV_CONTENT): for key, val in props.items(): lines.append(prop_tmpl.format(key=key, val=val)) indent = " " - properties = ''.join([indent + l + "\n" for l in lines]) + properties = ''.join([indent + line + "\n" for line in lines]) return template.format(properties=properties) |