CI: Add openstack-tox-pep8 job, fix pep8 failures
Since I8f5338b7eee31f1b8bc3e783d10666e3092a6540 we have not been running pep8 jobs in CI. This change fixes the issues introduced since then, and adds the job back. Unlike the original change, we are not using the openstack-python3-jobs template since it would use py38 on this branch. Change-Id: Ie15019f91b9e7b7f8cf97b628886f6b0beeb24fa (cherry picked from commit 610433b11ba3819869a892489546d9f8b2b743c2) (cherry picked from commit 022b2be9fc160c0731a9c97fc6eeb66992431ee5)
This commit is contained in:
parent
4fa4445a46
commit
e0afd3a3da
@ -162,11 +162,9 @@ key3:
|
|||||||
mock_read.return_value = config
|
mock_read.return_value = config
|
||||||
result = utils.read_config_dump_yaml_file("/path/to/file")
|
result = utils.read_config_dump_yaml_file("/path/to/file")
|
||||||
# Can't read the value without an encryption key, so just check type.
|
# Can't read the value without an encryption key, so just check type.
|
||||||
self.assertTrue(isinstance(result["key1"],
|
self.assertIsInstance(result["key1"], AnsibleVaultEncryptedUnicode)
|
||||||
AnsibleVaultEncryptedUnicode))
|
|
||||||
self.assertEqual(result["key2"], "value2")
|
self.assertEqual(result["key2"], "value2")
|
||||||
self.assertTrue(isinstance(result["key3"][0],
|
self.assertIsInstance(result["key3"][0], AnsibleVaultEncryptedUnicode)
|
||||||
AnsibleVaultEncryptedUnicode))
|
|
||||||
mock_read.assert_called_once_with("/path/to/file")
|
mock_read.assert_called_once_with("/path/to/file")
|
||||||
|
|
||||||
@mock.patch.object(utils, "read_file")
|
@mock.patch.object(utils, "read_file")
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
- kayobe-seed-vm-ubuntu-jammy-efi
|
- kayobe-seed-vm-ubuntu-jammy-efi
|
||||||
- kayobe-infra-vm-rocky9
|
- kayobe-infra-vm-rocky9
|
||||||
- kayobe-infra-vm-ubuntu-jammy
|
- kayobe-infra-vm-ubuntu-jammy
|
||||||
|
- openstack-tox-pep8
|
||||||
- openstack-tox-py39
|
- openstack-tox-py39
|
||||||
- openstack-tox-py310
|
- openstack-tox-py310
|
||||||
- openstack-tox-py311
|
- openstack-tox-py311
|
||||||
|
Loading…
x
Reference in New Issue
Block a user