diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2023-05-08 11:35:45 +0100 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2023-05-10 10:51:30 +0100 |
| commit | 7d80f9e9626d14ce2ab60e4b69e3ccd070f31e0d (patch) | |
| tree | 6498649965c44537669d58b2167b56612cd1490b /openstackclient/tests/functional/common/test_configuration.py | |
| parent | 7ca43885c26d9dd7903e7015c0a31f3486730eea (diff) | |
| download | python-openstackclient-7d80f9e9626d14ce2ab60e4b69e3ccd070f31e0d.tar.gz | |
Blacken openstack.common
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: Ifcb3c798666d74d596b8ecb3d6d507f782de7ba5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/tests/functional/common/test_configuration.py')
| -rw-r--r-- | openstackclient/tests/functional/common/test_configuration.py | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/openstackclient/tests/functional/common/test_configuration.py b/openstackclient/tests/functional/common/test_configuration.py index 614b3e46..2a4660a4 100644 --- a/openstackclient/tests/functional/common/test_configuration.py +++ b/openstackclient/tests/functional/common/test_configuration.py @@ -23,17 +23,13 @@ class ConfigurationTests(base.TestCase): """Functional test for configuration.""" def test_configuration_show(self): - # Test show without option raw_output = self.openstack('configuration show') items = self.parse_listing(raw_output) self.assert_table_structure(items, BASIC_CONFIG_HEADERS) cmd_output = self.openstack('configuration show', parse_output=True) - self.assertEqual( - configuration.REDACTED, - cmd_output['auth.password'] - ) + self.assertEqual(configuration.REDACTED, cmd_output['auth.password']) self.assertIn( 'auth.password', cmd_output.keys(), @@ -41,30 +37,25 @@ class ConfigurationTests(base.TestCase): # Test show --mask cmd_output = self.openstack( - 'configuration show --mask', parse_output=True, - ) - self.assertEqual( - configuration.REDACTED, - cmd_output['auth.password'] + 'configuration show --mask', + parse_output=True, ) + self.assertEqual(configuration.REDACTED, cmd_output['auth.password']) # Test show --unmask cmd_output = self.openstack( - 'configuration show --unmask', parse_output=True, + 'configuration show --unmask', + parse_output=True, ) # If we are using os-client-config, this will not be set. Rather than # parse clouds.yaml to get the right value, just make sure # we are not getting redacted. passwd = os.environ.get('OS_PASSWORD') if passwd: - self.assertEqual( - passwd, - cmd_output['auth.password'] - ) + self.assertEqual(passwd, cmd_output['auth.password']) else: self.assertNotEqual( - configuration.REDACTED, - cmd_output['auth.password'] + configuration.REDACTED, cmd_output['auth.password'] ) @@ -72,7 +63,6 @@ class ConfigurationTestsNoAuth(base.TestCase): """Functional test for configuration with no auth""" def test_configuration_show(self): - # Test show without option raw_output = self.openstack( 'configuration show', |
