diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2023-05-08 10:54:22 +0100 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2023-05-10 10:51:30 +0100 |
| commit | 35ba1d8f1304d3255b96b704d524666ec5b6fea2 (patch) | |
| tree | 6d4ab560d4086e8b1a1f935b8531d7e85550cc36 /openstackclient/tests/functional/volume/v2/test_service.py | |
| parent | 28ffa2bf9f017212da5eb84b0cf74df62e2f5eb9 (diff) | |
| download | python-openstackclient-35ba1d8f1304d3255b96b704d524666ec5b6fea2.tar.gz | |
Blacken openstackclient.volume
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: Ic318617c67ab7ce6527f9016b759a1d4b0b80802
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/tests/functional/volume/v2/test_service.py')
| -rw-r--r-- | openstackclient/tests/functional/volume/v2/test_service.py | 54 |
1 files changed, 16 insertions, 38 deletions
diff --git a/openstackclient/tests/functional/volume/v2/test_service.py b/openstackclient/tests/functional/volume/v2/test_service.py index 5794f81f..1101affc 100644 --- a/openstackclient/tests/functional/volume/v2/test_service.py +++ b/openstackclient/tests/functional/volume/v2/test_service.py @@ -25,32 +25,21 @@ class VolumeServiceTests(common.BaseVolumeTests): # Test volume service list --service cmd_output = self.openstack( - 'volume service list ' + - '--service ' + - services[0], + 'volume service list ' + '--service ' + services[0], parse_output=True, ) for x in cmd_output: - self.assertEqual( - services[0], - x['Binary'] - ) + self.assertEqual(services[0], x['Binary']) # Test volume service list --host cmd_output = self.openstack( - 'volume service list ' + - '--host ' + - hosts[0], + 'volume service list ' + '--host ' + hosts[0], parse_output=True, ) for x in cmd_output: - self.assertIn( - hosts[0], - x['Host'] - ) + self.assertIn(hosts[0], x['Host']) def test_volume_service_set(self): - # Get a service and host cmd_output = self.openstack( 'volume service list', @@ -61,9 +50,7 @@ class VolumeServiceTests(common.BaseVolumeTests): # Test volume service set --enable raw_output = self.openstack( - 'volume service set --enable ' + - host_1 + ' ' + - service_1 + 'volume service set --enable ' + host_1 + ' ' + service_1 ) self.assertOutput('', raw_output) @@ -71,22 +58,19 @@ class VolumeServiceTests(common.BaseVolumeTests): 'volume service list --long', parse_output=True, ) - self.assertEqual( - 'enabled', - cmd_output[0]['Status'] - ) - self.assertIsNone( - cmd_output[0]['Disabled Reason'] - ) + self.assertEqual('enabled', cmd_output[0]['Status']) + self.assertIsNone(cmd_output[0]['Disabled Reason']) # Test volume service set --disable and --disable-reason disable_reason = 'disable_reason' raw_output = self.openstack( - 'volume service set --disable ' + - '--disable-reason ' + - disable_reason + ' ' + - host_1 + ' ' + - service_1 + 'volume service set --disable ' + + '--disable-reason ' + + disable_reason + + ' ' + + host_1 + + ' ' + + service_1 ) self.assertOutput('', raw_output) @@ -94,11 +78,5 @@ class VolumeServiceTests(common.BaseVolumeTests): 'volume service list --long', parse_output=True, ) - self.assertEqual( - 'disabled', - cmd_output[0]['Status'] - ) - self.assertEqual( - disable_reason, - cmd_output[0]['Disabled Reason'] - ) + self.assertEqual('disabled', cmd_output[0]['Status']) + self.assertEqual(disable_reason, cmd_output[0]['Disabled Reason']) |
