def test_01search_by_email(self): #1.查询 rd_email = get_rd_value("/api/admin/credit/list", store_id,self.token,"account") data = {"store_id":store_id,"page_size":10,"page":1,"operator":"sunny_hong","token":self.token,"account":rd_email} result = public_post("/api/admin/credit/list",data) assert len(json.loads(result)["data"]["data"]) > 0 assert json.loads(result)["msg"] == "ok"
def test_04search_by_ctime(self): '''创建时间查询''' rd_ctime = get_rd_value("/api/admin/coupon/dealList", store_id, self.token, "ctime") # print(rd_ctime) if rd_ctime is None: return "list is null" data = { "store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "account": "", "code_type": 1, "asin": "", "receive": "", "code": "", "country": "", "start_time": rd_ctime, "end_time": rd_ctime } result = public_post("/api/admin/coupon/dealList", data) assert json.loads(result)["msg"] == "ok" assert len(json.loads(result)["data"]["data"]) > 0
def test_02search_by_ctime(self): '''邮件发送时间查询''' rd_ctime = get_rd_value("/api/admin/email/list", store_id, self.token, "ctime") data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "account": "", "start_time": rd_ctime, "end_time": rd_ctime} result = public_post("/api/admin/email/list", data) # print(result) assert json.loads(result)["msg"] == "ok"
def test_01search_by_email(self): '''邮箱查询''' rd_to_email = get_rd_value("/api/admin/email/list",store_id,self.token,"to_email") data = {"store_id": store_id,"page_size": 10,"page": 1,"operator":"sunny_hong", "token": self.token, "account": rd_to_email} result = public_post("/api/admin/email/list", data) # print(result) assert json.loads(result)["msg"] == "ok"
def test_03search_by_country(self): """站点查询""" rd_country = get_rd_value("/api/admin/activity/apply/list", store_id, self.token, "country") if rd_country is None: return "list is null" data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "audit_status": "", "account": "", "country": rd_country, "sku": ""} result = public_post("/api/admin/activity/apply/list", data) assert json.loads(result)["code"] == 1 assert json.loads(result)["data"]["pagination"]["total"] > 0
def test_04search_by_time(self): '''查询上传时间''' created_at = get_rd_value("/api/admin/activity/product/list", store_id, self.token, "created_at") # print(created_at) if created_at is None: return "list is null" data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "created_at": created_at} result = public_post("/api/admin/product/list", data) assert len(json.loads(result)["data"]["data"]) > 0
def test_01search_by_asin(self): """查询asin""" rd_asin = get_rd_value("/api/admin/activity/product/list",store_id,self.token,"asin") # print(rd_asin) if rd_asin is None: return "list is null" data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "asin": rd_asin} result = public_post("/api/admin/product/list", data) assert len(json.loads(result)["data"]["data"]) > 0
def test_04search_by_invite_time(self): """邀请时间查询""" rd_invite_time = get_rd_value("/api/admin/invite/list", store_id, self.token, "ctime") if rd_invite_time is None: return "list is null" data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "account": "", "country": "", "invite_code":"" , "source": "", "order_by_data": "","start_at":rd_invite_time,"end_at":rd_invite_time} result = public_post("/api/admin/invite/list", data) assert json.loads(result)["code"] == 1 assert json.loads(result)["data"]["pagination"]["total"] > 0
def test_01search_by_email(self): """邀请关系列表邮箱查询""" # 1.1随机获取list邮箱 rd_email = get_rd_value("/api/admin/invite/list",store_id,self.token,"account") if rd_email is None: return "list is null" data = {"store_id":store_id,"page_size":10,"page":1,"operator":"sunny_hong","token":self.token,"account":rd_email, "country":"","invite_code":"","source":"","order_by_data":""} result = public_post("/api/admin/invite/list",data) assert json.loads(result)["code"] == 1 assert json.loads(result)["data"]["pagination"]["total"] > 0
def test_03search_by_mb_type(self): '''查询模板类型''' mb_type = get_rd_value("/api/admin/activity/product/list", store_id, self.token, "mb_type") # print(mb_type) if mb_type is None: return "list is null" if mb_type == 3: mb_type+=1 data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "mb_type": mb_type} result = public_post("/api/admin/product/list", data) # print(len(json.loads(result)["data"]["data"])) assert len(json.loads(result)["data"]["data"]) > 0
def test_02search_by_sku(self): '''随机查询产品sku''' rd_sku = get_rd_value("/api/admin/product/list", store_id, self.token, "sku") # print(rd_sku) data = { "store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "store_product_id": "", "sku": rd_sku } result = public_post("/api/admin/product/list", data) assert len(json.loads(result)["data"]["data"]) > 0
def test_01search(self): """审核页面查询""" # 1.1随机获取list邮箱 rd_email = get_rd_value("/api/admin/share/list", store_id, self.token, "account") data = { "store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "audit_status": "", "account": rd_email, "country": "" } result = public_post("/api/admin/share/list", data) assert json.loads(result)["code"] == 1
def test_03search(self): #1.查询 rd_email = get_rd_value("/api/admin/order/list", store_id, self.token, "account") data = { "store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "orderno": "", "country": "", "act_id": "", "account": rd_email } result = public_post("/api/admin/order/list", data) assert json.loads(result)["code"] == 1
def test_01search_by_product_id(self): '''随机查询产品id''' rd_id = get_rd_value("/api/admin/product/list", store_id, self.token, "store_product_id") print(rd_id) if rd_id is None: return "list is null" data = { "store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "store_product_id": rd_id, "sku": "" } result = public_post("/api/admin/product/list", data) print(len(json.loads(result)["data"]["data"])) assert len(json.loads(result)["data"]["data"]) > 0
def test_04search_by_audit_status(self): """审核状态查询""" rd_audit_num = None rd_audit_status_txt = get_rd_value("/api/admin/activity/apply/list", store_id, self.token, "audit_status") # print(rd_audit_status_txt) if rd_audit_status_txt is None: return "list is null" if rd_audit_status_txt == "未审核": rd_audit_num = "0" elif rd_audit_status_txt == "已通过": rd_audit_num = "1" elif rd_audit_status_txt == "未通过": rd_audit_num = "2" elif rd_audit_status_txt == "其他": rd_audit_num = "3" data = {"store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "audit_status": rd_audit_num, "account": "", "country": "", "sku": ""} result = public_post("/api/admin/activity/apply/list", data) assert json.loads(result)["code"] == 1 assert json.loads(result)["data"]["pagination"]["total"] > 0
def test_01search_by_asin(self): '''查询asin''' rd_asin = get_rd_value("/api/admin/coupon/dealList", store_id, self.token, "asin") # print(rd_asin) if rd_asin is None: return "list is null" data = { "store_id": store_id, "page_size": 10, "page": 1, "operator": "sunny_hong", "token": self.token, "account": "", "code_type": 1, "asin": rd_asin, "receive": "" } result = public_post("/api/admin/coupon/dealList", data) assert json.loads(result)["msg"] == "ok" assert len(json.loads(result)["data"]["data"]) > 0