def test_getVericationLogList(self): url = wm_url() + "/pcaal/core/usercode/getVericationLogList" data = read_yaml("test_getVericationLogList.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) #print(s.text) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("执行商城订单-核销记录查询")
def test_listBookRecord(self): url = wm_url() + "/pcaal/core/order/listBookRecord" data = read_yaml("test_listBookRecord.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) #print(s.text) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("执行商城订单-预约记录查询")
def test_getRefundPledgeOrderList(self): url = wm_url() + "/pcaal/core/order/getRefundPledgeOrderList" data = read_yaml("test_getRefundPledgeOrderList.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) # print(s.text) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("执行押金退款列表")
def test_queryHotelCheckInRecordList(self): url = wm_url() + "/pcaal/core/order/queryHotelCheckInRecordList" data = read_yaml("test_queryHotelCheckInRecordList.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) #print(s.text) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("执行住宿记录查询")
def test_addOrUpdateAfterSaleSetting(self): url = wm_url() + "/pcaal/core/sharing/addOrUpdateAfterSaleSetting" data = read_yaml("test_addOrUpdateAfterSaleSetting.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) # 发送请求 # print(s.text) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("执行售后设置保存")
def test_listCanteenOrder(self): url = wm_url() + "/pcaal/core/canteen/order/listCanteenOrder" data = read_yaml("test_listCanteenOrder.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) #print(s.text) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("执行堂食订单查询")
def test_queryOrderListToB(self): url = wm_url() + "/pcaal/core/order/queryOrderListToB" data = read_yaml("test_queryOrderListToB.yaml") headers = wm_headers() s = requests.post(url=url, data=data, headers=headers) # print(s.text) result = json.loads(s.text) # print(result) a = result["errmsg"] assert "处理成功" in a print("执行收款码订单查询")
def test_getListType(self, **kwargs): url = wm_url() + "/pcaal/core/roomPricePlan/getListType" data = kwargs.get('testdata') json_data = json.dumps(data) headers = wm_headers() s = requests.post(url=url, data=json_data, headers=headers) result = json.loads(s.text) a = result["errmsg"] assert "处理成功" in a print("业务房价管理-房价计划查询")
def test_queryHotelBookOrderList(self, **kwargs): url = wm_url() + "/pcaal/core/order/queryHotelBookOrderList" data = kwargs.get('testdata') # 获取data json_data = json.dumps(data) # 转json格式 headers = wm_headers() s = requests.post(url=url, data=json_data, headers=headers) # token = json.dumps(s.text) # token_k = json.loads(token) # print(token_k) # with open('C:/Users/Public/Desktop/t1/wm_test/source/token.yaml',"w",encoding="utf-8") as f: # yaml.dump(token_k,f,Dumper=yaml.RoundTripDumper,allow_unicode=True,width=1000) result = json.loads(s.text) #转为字典格式 a = result["errmsg"] #实际结果 assert "处理成功" in a print("执行订房订单查询")