def createUser(): username = helper_functions.random_string(10) username += "@" username += helper_functions.random_string(5) username += "." username += helper_functions.random_string(3) password = helper_functions.random_string(10) return username, password
def createRandomList(number_of_columns, column_name_len): columns = [] for ii in range(0, number_of_columns): columns += [hf.random_string(column_name_len)] return columns
def createApp(): name = helper_functions.random_string(10) tar = helper_functions.random_string(1000) return name, tar
####################################### # Retrieve the user's data with no apps ####################################### ret = server.get_user_data(user[0], super_secret) if user[0] not in ret or user[1] not in ret: err(helper_functions.lineno(), ret) ################# # Get empty token ################# ret = server.get_token(user[0], super_secret) if "token:notSet" not in ret: err(helper_functions.lineno(), ret) ################# # Change password ################# newpw = helper_functions.random_string(10) ret = server.change_password(user[0], newpw, super_secret) if ret != "true": err(helper_functions.lineno(), ret) ####################################### # Retrieve the user's data with new pw ####################################### ret = server.get_user_data(user[0], super_secret) if user[0] not in ret or newpw not in ret: err(helper_functions.lineno(), ret) ###################### # Change password back ###################### ret = server.change_password(user[0], user[1], super_secret) if ret != "true": err(helper_functions.lineno(), ret)
if ret != "Error: user already exists": err(helper_functions.lineno(), ret) ret = server.does_user_exist(user[0], super_secret) if ret != "true": err(helper_functions.lineno(), ret) ####################################### # Retrieve the user's data with no apps ####################################### ret = server.get_user_data(user[0], super_secret) if user[0] not in ret or user[1] not in ret: err(helper_functions.lineno(), ret) ################# # Change password ################# newpw = helper_functions.random_string(10) ret = server.change_password(user[0], newpw, super_secret) if ret != "true": err(helper_functions.lineno(), ret) ####################################### # Retrieve the user's data with new pw ####################################### ret = server.get_user_data(user[0], super_secret) if user[0] not in ret or newpw not in ret: err(helper_functions.lineno(), ret) ###################### # Change password back ###################### ret = server.change_password(user[0], user[1], super_secret) if ret != "true": err(helper_functions.lineno(), ret)