def test_watchcarSuccess_taskNoEmpty(self): """测试添加看车记录接口,添加看车记录成功,taskNo为空,不校验,@author:liusai""" ordNo = getOrderNumber(self) result = helpWatchCar('', '2ewrew', '1', '001553731', '奥迪RS 3-2017款2017款 2.5T Limousine', ordNo, '就觉得亟待解决的家我是备注哈哈哈哈', '0') self.assertEqual(result['code'], 200)
def test_nextInvSuccess_nextInvitationOld(self): """测试添加改约接口,添加改约记录成功,nextInvitation时间为前一天,@author:liusai""" ordNo = getOrderNumber(self) cTime = getTime('yesterday') result = helpNextInvitation(cTime, '1', ordNo, '我是跟进记录哈哈哈哈', 'txjdjjdd', 'eeekeekekek') self.assertEqual(result['code'], 200)
def test_watchcarFail_resultTypeEmpty(self): """测试添加看车记录接口,添加看车记录失败,resultType(带看结果)为空,,@author:liusai""" ordNo = getOrderNumber(self) result = helpWatchCar('fdsfdsfda', 'fsdfds', '', '001553731', '奥迪RS 3-2017款2017款 2.5T Limousine', ordNo, '就觉得亟待解决的家我是备注哈哈哈哈', '0') self.assertIn("带看结果不能为空", result['message'])
def test_watchcarSuccess_carSourceTypeEmpty(self): """测试添加看车记录接口,添加看车记录成功,carSourceType为空,不校验,@author:liusai""" ordNo = getOrderNumber(self) result = helpWatchCar('fdsfdsfda', 'erewr', '1', '001553731', '奥迪RS 3-2017款2017款 2.5T Limousine', ordNo, '就觉得亟待解决的家我是备注哈哈哈哈', '') self.assertEqual(result['code'], 200)
def test_watchcarSuccess_carCodeEmpty(self): """测试添加看车记录接口,添加看车记录失败,carcode为空,@author:liusai""" ordNo = getOrderNumber(self) result = helpWatchCar('fdsfdsfda', 'fdsfds', '1', '', '奥迪RS 3-2017款2017款 2.5T Limousine', ordNo, '就觉得亟待解决的家我是备注哈哈哈哈', '0') self.assertIn("签约车源唯一码不能为空", result['message'])
def test_nextInvSuccess_followRecordEmptyl(self): """测试添加改约接口,添加改约记录成功,followRecord为空,@author:liusai""" ordNo = getOrderNumber(self) cTime = getTime('tomorrow') result = helpNextInvitation(cTime, '2', ordNo, '', 'txjdjjdd', 'eeekeekekek') self.assertEqual(result['code'], 200)
def test_nextInvFail_nextInvitationBig(self): """测试添加改约接口,添加改约记录失败,nextInvitation为30天后,@author:liusai""" ordNo = getOrderNumber(self) cTime = getTime('month') result = helpNextInvitation(cTime, '1', ordNo, '我是跟进记录哈哈哈哈', 'txjdjjdd', 'eeekeekekek') self.assertIn('改约时间必须为当前时间的30天以内', result['message'])
def test_nextInvFail_saleOrderNoUnusual(self): """测试添加改约接口,添加改约记录失败,saleOrderNo异常,@author:liusai""" ordNo = getOrderNumber(self) cTime = getTime('tomorrow') result = helpNextInvitation(cTime, '2', 'fdjsfdjklsfjdjfdskfjks', '我是跟进记录哈哈哈哈', 'txjdjjdd', 'eeekeekekek') self.assertIn('无此工单号', result['message'])
def test_nextInvFail_saleOrderNoEmpty(self): """测试添加改约接口,添加改约记录失败,saleOrderNo为空,@author:liusai""" ordNo = getOrderNumber(self) cTime = getTime('tomorrow') result = helpNextInvitation(cTime, '1', '', '我是跟进记录哈哈哈哈', 'txjdjjdd', 'eeekeekekek') self.assertIn('销售工单单号信息不能为空', result['message'])
def test_nextInvFail_invitationTypeUnusual(self): """测试添加改约接口,添加改约记录失败,invitationType非12,@author:liusai""" ordNo = getOrderNumber(self) cTime = getTime('tomorrow') result = helpNextInvitation(cTime, '0', ordNo, '我是跟进记录哈哈哈哈', 'txjdjjdd', 'eeekeekekek') self.assertIn('接待类型参数有误', result['message'])
def test_watchcarSuccess_followRecordEmpty(self): """测试添加看车记录接口,添加看车记录成功,followRecord为空,不校验,@author:liusai""" ordNo = getOrderNumber(self) result = helpWatchCar('fdsfdsfda', 'erewr', '1', '001553731', '奥迪RS 3-2017款2017款 2.5T Limousine', ordNo, '', '0') self.assertEqual(result['code'], 200)
def test_ReserveSuccess_emptycarFullName(self): """测试添加邀约记录接口,添加邀约记录成功,carFullName为空,不校验,@author:liusai""" ordNo = getOrderNumber(self) result = helpReserve("001553305", [ "https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg" ], "5", "TX156974125643811", "安那般那呐喊给您寄了跟进记录" "", "9", "哈哈哈我是地址", ordNo, "2019-10-13 14:30:38") self.assertEqual(result['code'], 200)
def test_ReserveFail_emptyPhoto(self): """测试添加邀约记录接口,添加邀约记录失败,followRecordPhotos为空,@author:liusai""" ordNo = getOrderNumber(self) result = helpReserve("001553305", "", "5", "TX156974125643811", "安那般那呐喊给您寄了跟进记录" "奥迪 RS 3 2017款 2.5T Limousine", "9", "哈哈哈我是地址", ordNo, "2019-10-13 14:30:38") self.assertEqual(result['error'], "Bad Request")
def test_ReserveSuccess_emptyfollowRecord(self): """测试添加邀约记录接口,添加邀约记录成功,followRecord为空,不校验,@author:liusai""" ordNo = getOrderNumber(self) result = helpReserve("001553305", [ "https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg" ], "5", "TX156974125643811", "" "奥迪 RS 3 2017款 2.5T Limousine", "9", "哈哈哈我是地址", ordNo, "2019-10-13 14:30:38") self.assertEqual(result['code'], 200)
def test_ReserveSuccess(self): """测试添加邀约记录接口,添加邀约记录成功,@author:liusai""" ordNo = getOrderNumber(self) result = helpReserve("001553305", [ "https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg" ], "5", "TX156974125643811", "安那般那呐喊给您寄了跟进记录" "奥迪 RS 3 2017款 2.5T Limousine", "9", "哈哈哈我是地址", ordNo, "2019-10-13 14:30:38") print(result)
def test_ReceiveFail_emptyfollowRecordPhotos(self): """测试添加接待记录接口,添加接待记录失败,followRecordPhotos为空(无验证码接待),@author:Houyanling""" ordNo = getOrderNumber(self) result = helpReceive("", "云店1销售云店1车务", "", "添加接待记录", "", ordNo, "", "0", "42bb5122483c4faeb21c468c7c6001cf", "TX157257447016885", "", 2, "", "", "北京市西城区二七剧场路7号", "2019-11-01 10:15:45") self.assertEqual(result['error'], "Bad Request")
def test_ReserveFail_unusualreserveTime(self): """测试添加邀约记录接口,添加邀约记录失败,reserveTime异常,@author:liusai""" ordNo = getOrderNumber(self) result = helpReserve("001553305", [ "https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg" ], "5", "TX156974125643811", "安那般那呐喊给您寄了跟进记录" "奥迪 RS 3 2017款 2.5T Limousine", "9", "哈哈哈我是地址", ordNo, "dddeee") print(result) self.assertEqual(result['message'], "添加预约记录异常")
def test_ReAllotSuccess_emptysalerId(self): """测试重新分配工单,分配成功,销售id为空(不校验)@author:Houyanling""" ordNo = getOrderNumber(self) result = helpReAllotC2SaleOrde(ordNo, "") print(result) self.assertEqual(result['code'], 200)
def test_Receive_emptyapproverName(self): """测试添加接待记录接口,添加接待记录失败,审批人为空(无验证码接待),@author:Houyanling""" ordNo = getOrderNumber(self) result = helpReceive( "", "", "", "添加接待记录", "", ordNo, "", "0", "42bb5122483c4faeb21c468c7c6001cf", "TX157257447016885", [ "https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg" ], 2, "39.917174", "116.352497", "北京市西城区二七剧场路7号", "2019-11-01 10:15:45") print(result) self.assertEqual(result['message'], "审批人不能为空")
def test_ReceiveFail_unusuallocationTime(self): """测试添加接待记录接口,添加接待记录成功 locationTime为空,不校验(无验证码接待),@author:Houyanling""" ordNo = getOrderNumber(self) result = helpReceive( "", "云店1销售云店1车务", "", "添加接待记录", "", ordNo, "", "0", "42bb5122483c4faeb21c468c7c6001cf", "TX157257447016885", [ "https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg" ], 2, "39.917174", "116.352497", "", "dddeee") print(result) self.assertEqual(result['code'], 200)
def test_nextInvFail_nextInvitationEmpty(self): """测试添加改约接口,添加改约记录失败,nextInvitation为空,@author:liusai""" ordNo = getOrderNumber(self) result = helpNextInvitation('', '1', ordNo, '我是跟进记录哈哈哈哈', 'txjdjjdd', 'eeekeekekek') self.assertIn(result['message'], "改约异常")
def test_creatFinanceSuccess(self): """测试创建金融单接口,创建成功,@author:liusai""" orderNo = getOrderNumber(self) result = helpCreatFinanceOrder(orderNo) self.assertEqual(result['code'], 200)