aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features/promise.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-08-23 12:23:58 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-23 12:23:58 +0000
commitaa427a97dcc96afe5b7c9c168470fd49e9331da8 (patch)
treef7ab1aac20bed93d550f786ef82195c740151683 /testcases/features/promise.py
parenta01dbcf5d10a2433eb4cb29d03677820996b9eb5 (diff)
parent3e95a1cd0721924e89e2cfd2960d4736bc6c5588 (diff)
Merge "when create/get/update failed return None rather than False"
Diffstat (limited to 'testcases/features/promise.py')
-rwxr-xr-xtestcases/features/promise.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testcases/features/promise.py b/testcases/features/promise.py
index 170f7549..f5db0261 100755
--- a/testcases/features/promise.py
+++ b/testcases/features/promise.py
@@ -87,7 +87,7 @@ def main():
logger.info("Creating tenant '%s'..." % TENANT_NAME)
tenant_id = openstack_utils.create_tenant(
keystone, TENANT_NAME, TENANT_DESCRIPTION)
- if tenant_id == '':
+ if not tenant_id:
logger.error("Error : Failed to create %s tenant" % TENANT_NAME)
exit(-1)
logger.debug("Tenant '%s' created successfully." % TENANT_NAME)
@@ -114,7 +114,7 @@ def main():
user_id = openstack_utils.create_user(
keystone, USER_NAME, USER_PWD, None, tenant_id)
- if user_id == '':
+ if not user_id:
logger.error("Error : Failed to create %s user" % USER_NAME)
exit(-1)
logger.debug("User '%s' created successfully." % USER_NAME)
@@ -171,7 +171,7 @@ def main():
SUBNET_NAME,
ROUTER_NAME,
SUBNET_CIDR)
- if network_dic is False:
+ if not network_dic:
logger.error("Failed to create the private network...")
exit(-1)