def test_talentSearch(my_login_password, positionid): res = rec_talent(positionid) sta = res.get('content').get('data').get('page').get('totalCount') assert_equal(1, res['state'], "推荐人才成功", f"推荐人才成功失败:{res.get('message')}", te='陈梦丹') assert_not_equal(0, sta, "数据返回成功", "未返回数据")
def test_search_pay_colleague(self, get_add_colleague_user_pay): global pay_userid pay_userid = add_pay_result.get('userId') for i in range(5): time.sleep(2) search_result = queryPriveligeAcount(keyword=get_add_colleague_user_pay) if search_result != []: break assert_not_equal([], search_result, '校验特权账号列表返回数据不为空通过', te='Anan') assert_equal(pay_userid, search_result[0].get('userid'), '校验特权账号列表返回了刚才添加的特权账号通过', te='Anan')
def test_create_shop_goodsOrder_course(self, get_shop_h5_token): file_path = os.getcwd() date1 = local_time() orderNofile = read_shop_order(file_path) b = list(orderNofile.keys()) for id in nohasBuy_courseid_list: leadtime = lead_time(date1) result = create_shop_goodsOrder_course( payLagouCoinNum=nohasBuy_courseids[id]["lgCoinPrice"], sellGoodsPriceId=nohasBuy_courseids[id]["sellGoodsPriceId"], gateLoginToken=get_shop_h5_token, shopOrderToken=nohasBuy_courseids[id]["orderToken"]) assert_equal(True, bool(result["content"]["orderNo"]), '课程创建订单用例通过', te='张红彦') #如果读取的文件中有值且id在list中,则进行断言,否则直接将值加入字典中即可 if id in b: if leadtime > 60: assert_not_equal(result["content"]["orderNo"], orderNofile[id], "大于一小时重新生成新订单用例通过", te='张红彦') record_shop_time(file_path, date1) orderNo.update({id: result["content"]["orderNo"]}) elif leadtime > 0: assert_equal(result["content"]["orderNo"], orderNofile[id], "一小时内订单id未变用例通过", te='张红彦') orderNo.update({id: result["content"]["orderNo"]}) else: orderNo.update({id: result["content"]["orderNo"]}) else: orderNo.update({id: result["content"]["orderNo"]}) record_shop_order(file_path, orderNo)
def test_is_verify_code_reach_upper_limit(): global send_verify_code_times send_verify_code_times = get_verify_code_message_len(countryCode, phone) assert_not_equal(-1, send_verify_code_times, '获取验证码发送次数用例通过', te='王洋')
def test_is_verify_code_reach_upper_limit(): global send_verify_code_times countryCode, phone = "0044", "2020070700" send_verify_code_times = get_verify_code_message_len(countryCode, phone) assert_not_equal(-1, send_verify_code_times, '获取验证码用例通过', te='张红彦')