diff options
Diffstat (limited to 'testcases')
-rwxr-xr-x | testcases/OpenStack/tempest/run_tempest.py | 4 | ||||
-rwxr-xr-x | testcases/features/promise.py | 6 | ||||
-rwxr-xr-x | testcases/vnf/vIMS/vIMS.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py index 7d023f5df..64a5ed778 100755 --- a/testcases/OpenStack/tempest/run_tempest.py +++ b/testcases/OpenStack/tempest/run_tempest.py @@ -132,12 +132,12 @@ def create_tempest_resources(): tenant_id = os_utils.create_tenant(keystone_client, TENANT_NAME, TENANT_DESCRIPTION) - if tenant_id == '': + if not tenant_id: logger.error("Error : Failed to create %s tenant" % TENANT_NAME) user_id = os_utils.create_user(keystone_client, USER_NAME, USER_PASSWORD, None, tenant_id) - if user_id == '': + if not user_id: logger.error("Error : Failed to create %s user" % USER_NAME) logger.debug("Creating private network for Tempest suite") diff --git a/testcases/features/promise.py b/testcases/features/promise.py index 170f75494..f5db02617 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) diff --git a/testcases/vnf/vIMS/vIMS.py b/testcases/vnf/vIMS/vIMS.py index dfbb6759c..373761794 100755 --- a/testcases/vnf/vIMS/vIMS.py +++ b/testcases/vnf/vIMS/vIMS.py @@ -277,7 +277,7 @@ def main(): tenant_id = os_utils.create_tenant( keystone, TENANT_NAME, TENANT_DESCRIPTION) - if tenant_id == '': + if not tenant_id: step_failure("init", "Error : Failed to create " + TENANT_NAME + " tenant") @@ -296,7 +296,7 @@ def main(): user_id = os_utils.create_user( keystone, TENANT_NAME, TENANT_NAME, None, tenant_id) - if user_id == '': + if not user_id: logger.error("Error : Failed to create %s user" % TENANT_NAME) logger.info("Update OpenStack creds informations") |