diff --git a/manila_tempest_tests/services/share/json/shares_client.py b/manila_tempest_tests/services/share/json/shares_client.py index 2a48005e..cd462ae1 100644 --- a/manila_tempest_tests/services/share/json/shares_client.py +++ b/manila_tempest_tests/services/share/json/shares_client.py @@ -238,8 +238,8 @@ class SharesClient(rest_client.RestClient): if share_status == status: return elif 'error' in share_status.lower(): - raise share_exceptions.\ - ShareBuildErrorException(share_id=share_id) + raise share_exceptions.ShareBuildErrorException( + share_id=share_id) if int(time.time()) - start >= self.build_timeout: message = ('Share %s failed to reach %s status within ' @@ -259,8 +259,8 @@ class SharesClient(rest_client.RestClient): body = self.get_snapshot(snapshot_id) snapshot_status = body['status'] if 'error' in snapshot_status: - raise share_exceptions.\ - SnapshotBuildErrorException(snapshot_id=snapshot_id) + raise share_exceptions.SnapshotBuildErrorException( + snapshot_id=snapshot_id) if int(time.time()) - start >= self.build_timeout: message = ('Share Snapshot %s failed to reach %s status ' @@ -280,8 +280,8 @@ class SharesClient(rest_client.RestClient): rule_status = rule['state'] break if 'error' in rule_status: - raise share_exceptions.\ - AccessRuleBuildErrorException(rule_id=rule_id) + raise share_exceptions.AccessRuleBuildErrorException( + rule_id=rule_id) if int(time.time()) - start >= self.build_timeout: message = ('Share Access Rule %s failed to reach %s status ' diff --git a/manila_tempest_tests/services/share/v2/json/shares_client.py b/manila_tempest_tests/services/share/v2/json/shares_client.py index 15e538c0..53c123e4 100644 --- a/manila_tempest_tests/services/share/v2/json/shares_client.py +++ b/manila_tempest_tests/services/share/v2/json/shares_client.py @@ -337,8 +337,8 @@ class SharesV2Client(shares_client.SharesClient): if instance_status == status: return elif 'error' in instance_status.lower(): - raise share_exceptions. \ - ShareInstanceBuildErrorException(id=instance_id) + raise share_exceptions.ShareInstanceBuildErrorException( + id=instance_id) if int(time.time()) - start >= self.build_timeout: message = ('Share instance %s failed to reach %s status within' diff --git a/manila_tempest_tests/tests/api/admin/test_shares_actions.py b/manila_tempest_tests/tests/api/admin/test_shares_actions.py index 779cd184..a9c62d2d 100644 --- a/manila_tempest_tests/tests/api/admin/test_shares_actions.py +++ b/manila_tempest_tests/tests/api/admin/test_shares_actions.py @@ -100,9 +100,9 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest): share["name"]) self.assertEqual(self.share_name, str(share["name"]), msg) - msg = "Expected description: '%s', "\ - "actual description: '%s'" % (self.share_desc, - share["description"]) + msg = ("Expected description: '%s', " + "actual description: '%s'" % (self.share_desc, + share["description"])) self.assertEqual(self.share_desc, str(share["description"]), msg) msg = "Expected size: '%s', actual size: '%s'" % ( @@ -330,12 +330,14 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest): get["name"]) self.assertEqual(self.snap_name, get["name"], msg) - msg = "Expected description: '%s', "\ - "actual description: '%s'" % (self.snap_desc, get["description"]) + msg = ("Expected description: '%s', " + "actual description: '%s'" % (self.snap_desc, + get["description"])) self.assertEqual(self.snap_desc, get["description"], msg) - msg = "Expected share_id: '%s', "\ - "actual share_id: '%s'" % (self.shares[0]["id"], get["share_id"]) + msg = ("Expected share_id: '%s', " + "actual share_id: '%s'" % (self.shares[0]["id"], + get["share_id"])) self.assertEqual(self.shares[0]["id"], get["share_id"], msg) @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND) diff --git a/manila_tempest_tests/tests/api/test_shares.py b/manila_tempest_tests/tests/api/test_shares.py index a02b5f8b..2543cf5f 100644 --- a/manila_tempest_tests/tests/api/test_shares.py +++ b/manila_tempest_tests/tests/api/test_shares.py @@ -164,8 +164,8 @@ class SharesNFSTest(base.BaseSharesTest): # verify share, created from snapshot get = self.shares_client.get_share(s2["id"]) - msg = "Expected snapshot_id %s as "\ - "source of share %s" % (snap["id"], get["snapshot_id"]) + msg = ("Expected snapshot_id %s as " + "source of share %s" % (snap["id"], get["snapshot_id"])) self.assertEqual(get["snapshot_id"], snap["id"], msg) @tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND) diff --git a/manila_tempest_tests/tests/api/test_shares_actions.py b/manila_tempest_tests/tests/api/test_shares_actions.py index 0f59d7a0..97dd9dd7 100644 --- a/manila_tempest_tests/tests/api/test_shares_actions.py +++ b/manila_tempest_tests/tests/api/test_shares_actions.py @@ -115,9 +115,9 @@ class SharesActionsTest(base.BaseSharesTest): share["name"]) self.assertEqual(self.share_name, six.text_type(share["name"]), msg) - msg = "Expected description: '%s', "\ - "actual description: '%s'" % (self.share_desc, - share["description"]) + msg = ("Expected description: '%s', " + "actual description: '%s'" % (self.share_desc, + share["description"])) self.assertEqual( self.share_desc, six.text_type(share["description"]), msg) diff --git a/manila_tempest_tests/tests/scenario/manager.py b/manila_tempest_tests/tests/scenario/manager.py index d991d4b4..522c3fdb 100644 --- a/manila_tempest_tests/tests/scenario/manager.py +++ b/manila_tempest_tests/tests/scenario/manager.py @@ -961,8 +961,8 @@ class NetworkScenarioTest(ScenarioTest): nic) source_host = source.ssh_client.host if should_succeed: - msg = "Timed out waiting for %s to become reachable from %s" \ - % (dest, source_host) + msg = ("Timed out waiting for %s to become reachable from %s" + % (dest, source_host)) else: msg = "%s is reachable from %s" % (dest, source_host) self.assertTrue(result, msg)