return resp
genderToggle = "Male"
- for x in range(1, numberOfPersons+1):
+ for x in range(1, numberOfPersons + 1):
if(genderToggle == "Male"):
genderToggle = "Female"
else:
return resp
- for x in range(1, numberOfCarPersons+1):
+ for x in range(1, numberOfCarPersons + 1):
strId = str(x)
payload = SettingsLibrary.add_car_person_template.substitute(Id=strId, personId="user" + strId)
</note>
"""
- print "Buying " + str(numberOfCarBuyers) + " Cars"
- for x in range(start, start+numberOfCarBuyers):
- strId = str(x+1)
+ print("Buying " + str(numberOfCarBuyers) + " Cars")
+ for x in range(start, start + numberOfCarBuyers):
+ strId = str(x + 1)
payload = SettingsLibrary.buy_car_rpc_template.substitute(personId="user" + strId, carId=strId)
"""
resp = UtilLibrary.get(SettingsLibrary.getCarPersonUrl(hostname, port), "admin", "admin")
resp.encoding = 'utf-8'
- print (resp)
+ print(resp)
return resp
resp = getCars(ip, port, 0)
if resp.status_code == 200:
print("Pass: car data available after addition")
- if resp.content.find("manufacturer100") == -1:
+ if resp.text.find("manufacturer100") == -1:
print("Fail: last car is not there")
else:
print("Pass: car data matches")
resp = getPersons(ip, port, 0)
if resp.status_code == 200:
print("Pass: people data available after addition")
- if resp.content.find("user100") == -1:
+ if resp.text.find("user100") == -1:
print("Fail: last person is not there")
else:
print("Pass: person data matches")
resp = getCarPersonMappings(ip, port, 0)
if resp.status_code == 200:
print("Pass: car person data available after addition")
- if resp.content.find("user100") == -1:
+ if resp.text.find("user100") == -1:
print("Fail: last car person is not there")
else:
print("Pass: car person data matches")
usageString = usageString + command + param
- print (usageString)
+ print(usageString)
#
call[sys.argv[2]](SettingsLibrary.hostname, SettingsLibrary.port, int(sys.argv[3]))
+
#
# main invoked
if __name__ == "__main__":