Remove some use of is operator, fix log printout spelling errors

This commit is contained in:
bealler
2021-02-11 09:22:14 -05:00
parent 155b7b766f
commit 5123ecef58
3 changed files with 6 additions and 7 deletions

View File

@@ -239,7 +239,7 @@ parser.add_argument("-i", "--ignore", type=str, default='no', choices=['yes', 'n
help="Set to 'no' to ignore current running version on AP and run sanity including upgrade")
parser.add_argument("-r", "--report", type=str, default=report_path,
help="Report directory path other than default - directory must already exist!")
parser.add_argument("-m", "--model", type=str, choices=['ea8300', 'ecw5410', 'ecw5211', 'ec420', "wf188n"],
parser.add_argument("-m", "--model", type=str, choices=['ea8300', 'ecw5410', 'ecw5211', 'ec420', "wf188n", "wf194c", "ex227", "ex447", "eap101", "eap102"],
help="AP model to be run")
parser.add_argument("--tr_prefix", type=str, default=testRunPrefix, help="Testrail test run prefix override (default is Env variable)")
parser.add_argument("--skip_upgrade", dest="skip_upgrade", action='store_true', help="Skip Upgrade testing")
@@ -1866,7 +1866,7 @@ with open('sanity_status.json', 'w') as json_file:
# Calculate percent of tests passed for report
for key in ap_models:
if report_data['fw_available'][key] is "No":
if report_data['fw_available'][key] == "No":
report_data["pass_percent"][key] = "Not Run"
else:
# no_of_tests = len(report_data["tests"][key])

View File

@@ -112,7 +112,7 @@ for key in equipment_id_dict:
############## Bridge Throughput Testing #################################
###########################################################################
print("Testing for Bridge SSIDs")
logger.info("Starting Brdige SSID tput tests on " + key)
logger.info("Starting Bridge SSID tput tests on " + key)
###Set Proper AP Profile for Bridge SSID Tests
test_profile_id = profile_info_dict[fw_model]["profile_id"]
#print(test_profile_id)
@@ -385,7 +385,6 @@ for key in equipment_id_dict:
##Set port for LANForge
port = vlan_upstream_port
# 5G WPA2 Enterprise UDP DS/US and TCP DS/US
ap_model = fw_model
firmware = ap_fw
@@ -501,7 +500,7 @@ for key in equipment_id_dict:
#Indicates throughput has been run for AP model
sanity_status['sanity_status'][key] = "tput run"
logger.info("Trhoughput tests complete on " + key)
logger.info("Throughput tests complete on " + key)
elif sanity_status['sanity_status'][key] == "tput run":
print("Throughput test already run on", key)

View File

@@ -69,7 +69,7 @@ class CloudSDK:
}
status_response = requests.request("GET", equip_fw_url, headers=headers, data=payload)
status_code = status_response.status_code
if status_code is 200:
if status_code == 200:
status_data = status_response.json()
#print(status_data)
try:
@@ -266,7 +266,7 @@ class CloudSDK:
}
del_profile = requests.request("DELETE", url, headers=headers, data=payload)
status_code = del_profile.status_code
if status_code is 200:
if status_code == 200:
return("SUCCESS")
else:
return ("ERROR")