Use parenthesis instead of backslashes in tempest folder
Use parenthesis instead of backslashes in tempest folder
TrivialFix
Change-Id: I6c2ea07b0bfc5852b28e44989406cc10eb912e33
diff --git a/manila_tempest_tests/services/share/json/shares_client.py b/manila_tempest_tests/services/share/json/shares_client.py
index 2a48005..cd462ae 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 @@
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 @@
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 @@
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 15e538c..53c123e 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 @@
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 779cd18..a9c62d2 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 @@
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 @@
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 a02b5f8..2543cf5 100644
--- a/manila_tempest_tests/tests/api/test_shares.py
+++ b/manila_tempest_tests/tests/api/test_shares.py
@@ -164,8 +164,8 @@
# 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 0f59d7a..97dd9dd 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 @@
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 64c5e8a..5cd4253 100644
--- a/manila_tempest_tests/tests/scenario/manager.py
+++ b/manila_tempest_tests/tests/scenario/manager.py
@@ -961,8 +961,8 @@
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)