コード例 #1
0
ファイル: caseFinance.py プロジェクト: RomySaber/api-test
 def test_010_warnOffline(self):
     # 离线报警获取离线报警记录
     f.test_warnOffline_getWarns('', 1, 10, 0)
     f.test_warnOffline_getWarns('', 1, 10, 1)
     warnid = fs.get_warn_id('lx')
     # 离线报警处理报警信息页面初始化数据
     r = json.loads(f.test_warnOffline_getHandleWarnMessage(warnid))
     a.verity(r['data']['warnid'], warnid, '断言warnid')
     a.verity(r['data']['warnFeedbacks'][0]['feedbackName'], "误报", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][0]['feedbackCode'], '0', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][1]['feedbackName'], "数据异常", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][1]['feedbackCode'], '10', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][2]['feedbackName'], "二次抵押", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][2]['feedbackCode'], '2', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][3]['feedbackName'], "失联", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][3]['feedbackCode'], '3', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][4]['feedbackName'], "GPS换车安装", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][4]['feedbackCode'], '8', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][5]['feedbackName'], "定位偏差", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][5]['feedbackCode'], '9', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][6]['feedbackName'], "其它", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][6]['feedbackCode'], '99', '断言feedbackCode')
     a.verity(r['data']['warnRisks'][0]['warnCode'], "1", '断言warnCode')
     a.verity(r['data']['warnRisks'][0]['warnName'], "低风险", '断言warnName')
     a.verity(r['data']['warnRisks'][1]['warnCode'], "2", '断言warnCode')
     a.verity(r['data']['warnRisks'][1]['warnName'], "中风险", '断言warnName')
     a.verity(r['data']['warnRisks'][2]['warnCode'], "3", '断言warnCode')
     a.verity(r['data']['warnRisks'][2]['warnName'], "高风险", '断言warnName')
     a.verity(r['data']['warnRisks'][3]['warnCode'], "0", '断言warnCode')
     a.verity(r['data']['warnRisks'][3]['warnName'], "正常", '断言warnName')
     # 离线报警执行报警信息处理
     f.test_warnOffline_doHandleWarn(0, '', '', 1, warnid)
     financeid = fs.get_finance_id_bywarnid(warnid)
     # 离线报警获取车辆和GPS列表
     f.test_warnOffline_getFinanceById(financeid)
     gpsid = fs.get_warn_id('lx', 'gps_id', 0, financeid)
     # 通过gpsId和离线时长查询离线点
     f.test_warnOffline_getOfflinePoint(gpsid, "")
コード例 #2
0
 def test_008_warnOffline_getOfflinePoint(self):
     warnid = fs.get_warn_id('lx')
     financeid = fs.get_finance_id_bywarnid(warnid)[0][0]
     gpsid = fs.get_warn_id('lx', 'wire_id', 0, financeid)
     # 通过gpsId和离线时长查询离线点
     f.test_warnOffline_getOfflinePoint(gpsid, "")
コード例 #3
0
 def test_007_warnOffline_getFinanceById(self):
     warnid = fs.get_warn_id('lx')
     financeid = fs.get_finance_id_bywarnid(warnid)
     # 离线报警获取车辆和GPS列表
     f.test_warnOffline_getFinanceById(financeid)