def setUp(self): nowtime = time.strftime("%Y_%m_%d_%H_%M_%S") self.email = global_variable.cir_var + "_" + nowtime + "@1.com" print("email:", self.email) self.country = 86 # self.phoneNumber = "10001231230" self.result = {'id': 100257, 'canSignin': 1} while (self.result != None): self.phoneNumber = random.randint(20000000000, 99999999999) self.result = get_data_from_db.get_userid_by_phoneNumber( self.phoneNumber) print("self.result", self.result) print("phoneNumber:", self.phoneNumber) register.register_action(self.email) userid = get_data_from_db.get_user_id_by_email(self.email) self.token = login.login_with_param(self.email) data = bind_GA_page.bind_GA(self.email, self.token) # self.token = data.get("token") bind_phone_page.bind_phone_send_email_api(self.token) bind_phone_page.bind_phone_send_message_api(self.country, self.phoneNumber, self.token) self.email_code = get_data_from_redis.get_bind_phone_email_code_from_redis( userid) print("email_code:", self.email_code) self.message_code = get_data_from_redis.get_bind_phone_message_code_from_redis( self.country, self.phoneNumber) print("message_code:", self.message_code)
def setUp(self): self.email = "*****@*****.**" self.new_antiPhishing_code = "1111111111" self.modify_antiPhishing_code = "2222222222" check_email_result = get_data_from_db.get_user_id_by_email(self.email) if check_email_result == None: print("用户", self.email, "未存在,注册开始") register.register_action(self.email) else: print("用户", self.email, "已存在") self.userid = get_data_from_db.get_user_id_by_email(self.email) print("self.userid:", self.userid) check_result = get_data_from_db.get_user_GA_secret(self.userid) print("check_result:", check_result) if (check_result == None): print("用户", self.email, "未绑定GA,绑定GA开始") self.userid = get_data_from_db.get_user_id_by_email(self.email) self.token = login.login(self.email) response = bind_GA_page.bind_GA(self.email, self.token) else: print("用户", self.email, "已绑定GA") self.token = login.login(self.email) apCode_result = get_data_from_db.get_apcode_by_userid( self.userid).get("ap_code") if apCode_result == None: print("用户", self.email, "未绑定防钓鱼码,开始绑定防钓鱼码") self.secret = get_data_from_db.get_bind_GA_secret_fromdb( self.userid) self.GA_code = get_GA_code.get_google_code(self.secret) response = antiPhishing_code_page.add_antiPhishing_code_api( self.new_antiPhishing_code, self.GA_code, self.token) else: print("用户", self.email, "已设置防钓鱼码") self.token = login.login(self.email)
def setUp(self): self.email = "*****@*****.**" check_email_result = get_data_from_db.get_user_id_by_email(self.email) if check_email_result == None: print("用户", self.email, "未存在,注册开始") register.register_action(self.email) else: print("用户", self.email, "已存在")
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.email = "*****@*****.**" email = check_user_is_exited(self.email) if email is None: register_action(self.email) else: pass
def setUp(self): nowtime = time.strftime("%Y_%m_%d_%H_%M_%S") self.email = global_variable.cir_var + "_" + nowtime + "@1.com" self.new_antiPhishing_code = "11111111111" register.register_action(self.email) self.userid = get_data_from_db.get_user_id_by_email(self.email) self.token = login.login_with_param(self.email) data = bind_GA_page.bind_GA(self.email, self.token)
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.email = "*****@*****.**" email = check_user_is_exited(self.email) if email is None: register_action(self.email) bind_GA(self.email, login(self.email)) userid = get_user_id_by_email(self.email) bind_phone(userid, 86, 1357924680, login(self.email)) transfer_all(userid, 10000000) else: pass
def setUp(self): self.email = "*****@*****.**" self.new_country = 359 # self.new_phoneNumber = "10001231230" self.result = {'id': 100257, 'canSignin': 1} while (self.result != None): self.new_phoneNumber = random.randint(20000000000, 99999999999) self.result = get_data_from_db.get_userid_by_phoneNumber( self.new_phoneNumber) print("self.result", self.result) print("new_country:", self.new_country, "new_phoneNumber:", self.new_phoneNumber) check_email_result = get_data_from_db.get_user_id_by_email(self.email) if check_email_result == None: print("用户", self.email, "未存在,注册开始") register.register_action(self.email) else: print("用户", self.email, "已存在") self.userid = get_data_from_db.get_user_id_by_email(self.email) print("self.userid:", self.userid) check_result = get_data_from_db.get_phoneNumber_by_userid( self.userid) print("check_result:", check_result) if (check_result.get("phone_number") == None): print("用户", self.email, "未绑定手机,绑定手机开始") self.old_country = 86 self.result = {'id': 100257, 'canSignin': 1} while (self.result != None): self.old_phoneNumber = random.randint( 20000000000, 99999999999) self.result = get_data_from_db.get_user_id_by_email( self.old_phoneNumber) print("self.result:", self.result) print("old_country:", self.old_country, "old_phoneNumber:", self.old_phoneNumber) self.userid = get_data_from_db.get_user_id_by_email(self.email) self.token = login.login(self.email) print("old_phoneNumber:", self.old_phoneNumber) response = bind_phone_page.bind_phone(self.userid, self.old_country, self.old_phoneNumber, self.token) print("绑定手机 response:", response) """由于短信发送60s限制,所以等待60s""" print("等待60s开始") time.sleep(60) print("等待60s结束") else: print("用户", self.email, "已绑定手机,开始登录") self.token = login.login(self.email)
def setUp(self): self.email = "*****@*****.**" check_email_result = get_data_from_db.get_user_id_by_email(self.email) if check_email_result == None: print("用户", self.email, "未存在,注册开始") register.register_action(self.email) else: print("用户", self.email, "已存在") # 查看是否有存在的进行中的IEO项目 self.result = get_data_from_db.get_ongoing_ieoid() if self.result != None: self.ieoId = self.result.get("id") else: print("没有存在的进行中的IEO项目,开始创建") self.manage_token = manage_login.manage_login_by_cir(global_variable.cir_var) create_ieo.create_ieo(self.manage_token) self.result = get_data_from_db.get_ongoing_ieoid() if self.result != None: self.ieoId = self.result.get("id")
def setUp(self): self.email = "*****@*****.**" check_email_result = get_data_from_db.get_user_id_by_email(self.email) if check_email_result == None: print("用户", self.email, "未存在,注册开始") register.register_action(self.email) else: print("用户", self.email, "已存在") self.userid = get_data_from_db.get_user_id_by_email(self.email) print("self.userid:", self.userid) check_result = get_data_from_db.get_user_GA_secret(self.userid) print("check_result:", check_result) if (check_result == None): print("用户", self.email, "未绑定GA,绑定GA开始") self.userid = get_data_from_db.get_user_id_by_email(self.email) self.token = login.login(self.email) response = bind_GA_page.bind_GA(self.email, self.token) else: print("用户", self.email, "已绑定手机,开始登录") self.token = login.login(self.email)
def setUp(self): # 准备email # 注册 # 登录获取token now_time = time.strftime("%Y-%m-%d_%H_%M_%S") # email = now_time + "@1.com" email = global_variable.cir_var + "_" + now_time + "@1.com" print("email:", email) register.register_action(email) self.token = login.login_with_param(email) bind_GA_page.get_GA_secret_api(self.token) self.userid = get_data_from_db.get_user_id_by_email(email) self.secret = get_data_from_db.get_bind_GA_secret_fromdb(self.userid) print("secret", self.secret) self.GA_code = get_GA_code.get_google_code(self.secret) print("GA_code", self.GA_code) bind_GA_page.bind_GA_send_email_api(self.token) self.email_code = get_data_from_redis.get_bind_GA_email_code_from_redis( self.userid) print("email_code", self.email_code)