def test_presentCar(self, userLogin, send_data, expect): """查看在场记录""" re = Information(userLogin).getPresentCar(send_data["parkName"], send_data["carNum"]) result = re Assertions().assert_in_text(result, send_data["carNum"]) Assertions().assert_in_text(result, send_data["ticketName"])
def test_mockCarInB(self, send_data, expect): """模拟车辆B进场""" re = cloudparking_service().mockCarInOut(send_data["carNumB"], 0, send_data["inClientID"]) result = re Assertions().assert_in_text(result['screen'], expect["inscreenB"]) Assertions().assert_in_text(result['voice'], expect["invoiceB"])
def test_mockCarOutA(self, send_data, expect): """模拟车辆A离场""" re = cloudparking_service().mockCarInOut(send_data["carNumA"], 1, send_data["outClientID"]) result = re Assertions().assert_in_text(result['screen'], expect["outScreenA"]) Assertions().assert_in_text(result['voice'], expect["outVoiceA"])
def test_mockCarIn(self, sentryLogin, send_data, expect): """模拟车辆进场""" re = cloudparking_service().mockCarInOut(send_data["carNum"], 0, send_data["inClientID"]) result = re Assertions().assert_in_text(result['screen'], expect["inScreenMsg"]) Assertions().assert_in_text(result['voice'], expect["inVoiceMsg"])
def test_mockCarOut(self, send_data, expect): """模拟月票车无在场辆离场""" re = cloudparking_service().mockCarInOut(send_data["carNum"],1,send_data["outClientID"]) result = re Assertions().assert_in_text(result['open_gate'], expect["outOpenGateMsg"]) Assertions().assert_in_text(result['screen'], expect["outScreenMsg"]) Assertions().assert_in_text(result['voice'], expect["outVoiceMsg"])
def test_mockCarOut(self, send_data, expect): """模拟车辆离场""" re = cloudparking_service().mockCarInOut(send_data["carNum"], 1, send_data["outClientID"]) result = re Assertions().assert_in_text(result, expect["screen"]) Assertions().assert_in_text(result, expect["voice"])
def test_sentryCheckOutAbnormal(self, sentryLogin, send_data, expect): """岗亭异常放行-查看车辆离场信息""" re = CarInOutHandle(sentryLogin).carInOutHandle(send_data['carNum'],send_data['carOutHandleType'],send_data['carOut_jobId']) result = re Assertions().assert_in_text(result['screen'], expect['checkCarOutScreen']) Assertions().assert_in_text(result['voice'], expect['checkCarOutVoice']) Assertions().assert_in_text(result['open_gate'], expect['checkCarOutOpenGate'])
def test_sentryPay(self,sentryLogin,send_data,expect): """岗亭收费处收费-查看车辆离场信息""" re = CarInOutHandle(sentryLogin).carInOutHandle(send_data['carNum'],send_data['carOutHandleType'],send_data['carOut_jobId']) result = re Assertions().assert_in_text(result['screen'], expect['outscreen']) Assertions().assert_in_text(result['voice'], expect['outvoice']) Assertions().assert_in_text(result['open_gate'], expect['outOpen_gate'])
def test_shiftMoneys(self, sentryLogin, send_data, expect): """查看收费流水清单""" re = PersonalInfo(sentryLogin).shiftMoneys() result = re[0] Assertions().assert_text(result['car_code'], expect['tollFlowCarCodeMsg']) Assertions().assert_in_text(result['payVal'], expect['tollFlowPayValMsg'])
def test_mockCarIn(self, send_data, expect): re = cloudparking_service().mockCarInOut(send_data['matchCarNum'], 0, send_data['inClientID']) result = re Assertions().assert_in_text(result['screen'], expect["carInScreen"]) Assertions().assert_in_text(result['voice'], expect["carInVoice"]) Assertions().assert_in_text(result['open_gate'], expect["carInOpenGate"])
def test_presentCarB(self, userLogin, send_data, expect): """查看在场记录""" re = Information(userLogin).getPresentCar(send_data["parkName"], send_data["carNumB"]) result = re[0] Assertions().assert_in_text(result['carNo'], expect["presentCarBMsg"]) Assertions().assert_in_text(result['vipType'], expect["presentCarBvipTypeBMsg"])
def test_getAbnormalPicCar(self, userLogin, send_data, expect): """POMP上查看异常拍照记录""" re = Information(userLogin).getAbnormalPicCar(send_data["parkName"], send_data["carNum"]) result = re Assertions().assert_in_text(result, expect["getAbnormalPicCarMsg"]) Assertions().assert_in_text(result["data"]["carCode"], expect["carNum"])
def test_mockCarOut2(self, send_data, expect): """模拟车辆离场""" from time import sleep sleep(5) re = cloudparking_service().mockCarInOut(send_data["carNum"],1,send_data["outClientID"]) result = re Assertions().assert_in_text(result['screen'], expect["outscreen2"]) Assertions().assert_in_text(result['voice'], expect["outvoice2"])
def test_recordOut(self, sentryLogin, send_data, expect): """在pc端查看离场记录""" re = CarInOutHandle(sentryLogin).getCarOutRecord( send_data['carNum'], send_data['parkName']) result = re[0] Assertions().assert_text(result['carCode'], expect['recordOutCarNum']) Assertions().assert_in_text(result['payVal'], expect['recordOutPayVal'])
def test_checkCarInOutHistoryVIPType(self, userLogin, send_data, expect): """查看进出场记录中查看到VIP类型""" re = Information(userLogin).getCarLeaveHistory(send_data["parkName"], send_data["carNum"]) result = re[0] Assertions().assert_in_text(result['enterVipTypeStr'], expect["checkCarInOutHistoryVIPTypeMsg"]) Assertions().assert_in_text(result['leaveVipTypeStr'], expect["checkCarInOutHistoryVIPTypeMsg"])
def test_adjustCarInNum(self, sentryLogin, send_data, expect): """校正进场车辆""" re = CarInOutHandle(sentryLogin).adjustCarNum( send_data['carNum'], send_data['adjustCarNum'], send_data['adjustCarType']) result = re Assertions().assert_in_text(result['carNo'], expect["adjustCarNum"]) Assertions().assert_in_text(result['carSizeTypeInt'], expect["adjustCarType"])
def test_checkCarLeaveType(self, userLogin, send_data, expect): """查看访客车辆离场记录车辆类型""" re = Information(userLogin).getCarLeaveHistory(send_data['parkName'], send_data['carNum']) result = re[0] Assertions().assert_text(result['leaveVipTypeStr'], expect["checkCarleaveVipTypeStrMsg"]) Assertions().assert_text(result['enterVipTypeStr'], expect["checkenterVipTypeStrMsg"])
def test_checkCarIn(self, sentryLogin, send_data, expect): """岗亭端登记放入,查看车辆进场屏显,声音,开闸信息""" re = CarInOutHandle(sentryLogin).carInOutHandle( send_data['carNum'], send_data['inType'], send_data['carIn_jobId']) result = re Assertions().assert_in_text(result['voice'], expect["checkCarInVoice"]) Assertions().assert_in_text(result['open_gate'], expect["checkCarInIsOpenGate"]) Assertions().assert_in_text(result['screen'], expect["checkCarInScreen"])
def test_checkHandleOutHistoryMsg(self, sentryLogin, send_data, expect): """岗亭端查看单条记录的历史消息详情""" re = CarInOutHandle(sentryLogin).getHandleHistoryMsg() result = re[0]["content"] Assertions().assert_text(result["leaveCarNo"], expect["handleCarOutHistoryCarNo"]) Assertions().assert_text(result["reason"], expect["handleCarOutHistoryReason"]) Assertions().assert_text(result["abName"], expect["handleCarOutHistoryAbName"])
def test_checkCouponUsedList(self, userLogin, send_data, expect): """查看使用流水""" re = Coupon(userLogin).getCouponSerialList(send_data["parkName"], send_data["carNum"]) result = re Assertions().assert_in_text(result, expect["checkSerialListAMessage"]) Assertions().assert_in_text(result, expect["checkSerialListBMessage"]) Assertions().assert_in_text(result, expect["checkSerialListCMessage"]) Assertions().assert_in_text(result, expect["checkSerialListDMessage"]) Assertions().assert_in_text(result, expect["checkSerialListEMessage"])
def test_checkCentralChargeRecord(self, centralTollLogin, send_data, expect): """中央查询-缴费明细""" re = PresentCarHandle(centralTollLogin).centralChargeRecord( send_data['carNum']) result = re[0] Assertions().assert_in_text(result['realValue'], expect["centralChargeRecordMsg"]) Assertions().assert_in_text(result['invoiceType'], expect["centralInvoiceTypeMsg"])
def test_mockMonthTicketCarOut(self, send_data, expect): """模拟月票车辆离场""" from time import sleep sleep(5) re = cloudparking_service().mockCarInOut(send_data["carNum"], 1, send_data["outClientID"]) result = re Assertions().assert_in_text(result['screen'], expect["mockTicketCarOutScreenMsg"]) Assertions().assert_in_text(result['voice'], expect["mockTicketCarOutVoiceMsg"])
def test_checkCarIn(self, sentryLogin, send_data, expect): """岗亭端登记放行-看校正后进场车辆屏显语音开闸""" re = CarInOutHandle(sentryLogin).carInOutHandle( send_data['adjustCarNum'], send_data['carInHandleType'], send_data['carIn_jobId']) result = re Assertions().assert_in_text(result['screen'], expect["checkCarInScreen"]) Assertions().assert_in_text(result['voice'], expect["checkCarInVoice"]) Assertions().assert_in_text(result['open_gate'], expect["checkCarInOpenGate"])
def test_checkCarOut(self, sentryLogin, send_data, expect): """岗亭端登记放出""" re = CarInOutHandle(sentryLogin).carInOutHandle( send_data['carNum'], send_data['carOutHandleType'], send_data['carOut_jobId']) result = re Assertions().assert_in_text(result['voice'], expect["checkCarOutVoice"]) Assertions().assert_in_text(result['open_gate'], expect["checkCarOutIsOpenGate"]) Assertions().assert_in_text(result['screen'], expect["checkCarOutScreen"])
def test_checkCouponSendList(self, userLogin, send_data, expect): """查看发放流水""" re = Coupon(userLogin).getCouponGrantList(send_data["parkName"], send_data["carNum"]) result = re Assertions().assert_in_text(result, expect["checkCouponGrantListMessage"])
def test_checkParkingBillDetail(self, userLogin, send_data, expect): """查看收费流水""" re = Information(userLogin).getParkingBillDetail( send_data["parkName"], send_data["carNum"]) result = re Assertions().assert_in_text(result, expect["checkParkingBillDetailMessage"])
def test_mockCarOut(self, rmpsLogin, send_data, expect): """模拟车辆出场""" re = RpmsParkingReq(rmpsLogin).carOut(send_data["parkCode"], send_data["rmpsParkName"], send_data["carNum"]) result = re Assertions().assert_in_text(result, expect["mockCarOutMessage"])
def test_mockCarIn(self, rmpsLogin, send_data, expect): """模拟车辆进场""" re = RpmsParkingReq(rmpsLogin).carIn(send_data["parkCode"], send_data['rmpsParkName'], send_data["carNum"]) result = re['message'] Assertions().assert_text(result, expect["mockCarInMessage"])
def test_checkTraderAccount(self, userLogin, send_data, expect): """查找商家""" re = Trader(userLogin).getTraderListData(send_data['parkName'], send_data['traderName']) result = re self.save_data('traderAccount', result[0]['account']) Assertions().assert_in_text(result, expect["traderAccountMsg"])
def test_addSell(self, userLogin, send_data, expect): """售卖优惠劵""" re = Coupon(userLogin).addSell(send_data["couponName"], send_data["parkName"], send_data["traderName"]) result = re Assertions().assert_in_text(result, expect["addSellMessage"])