def test_00_cj_studentchange_getTestdata(self): '''测试成教转报测试数据在线生成''' try: BmsApi().toRecruitAdd(1) BmsApi().recruitAdd(1) BmsApi().toPay(1) BmsApi().pay(1) BmsApi().reviewFee(1) status_code = 'Success' except Exception as e: status_code = 'False' self.assertEqual(status_code, 'Success', msg="成教转报测试数据在线生成失败!")
def test_05_gk_pay(self): '''国开第一学期学费支付接口''' response = BmsApi().pay(2) status_code = response[0] code_text = response[1] self.assertEqual(status_code,200,msg="国开支付接口调用失败!") self.assertEqual(code_text,'{"code":"00","body":"SUCCESS","msg":"","ok":true}',msg="国开支付接口服务处理失败!")
def test_02_cj_pay(self): '''缴纳辅导费接口''' response = BmsApi().pay(1) status_code = response[0] code_text = response[1] self.assertEqual(status_code,200,msg="成教辅导费支付失败") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教辅导费支付接口服务处理失败!")
def test_03_cj_pay_check(self): '''辅导费缴费审核''' response = BmsApi().reviewFee(1) status_code = response[0] code_text = response[1] self.assertEqual(status_code,200,msg="成教辅导费支付审核失败") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教辅导费支付审核接口服务处理失败!")
def test_04_cj_passStudentAuditModify(self): '''成教新生信息修改审核接口''' response = BmsApi().passStudentAuditModify() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="学员新生信息修改审核失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="学员新生信息修改审核失败服务处理异常!!")
def test_00_login(self): '''后台登录接口''' response = BmsApi().login() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="后台登录接口异常!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="后台登录接口异常!失败!")
def test_04_gk_recruit(self): '''国开学员信息录入''' response = BmsApi().recruitAdd(2) status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="国开学员报读接口调用失败!!") self.assertEqual(code_text, '{"code":"00","body":null,"msg":"","ok":true}', msg="国开学员报读接口服务处理失败!!")
def test_02_cj_modify_newidcard(self): '''成教学员新生信息异动申请''' response = BmsApi().cj_insertStudentModify('',create_identity(int(area_dict1), 22, 1),'','','') '''参数依次为newStdName,newIdCard,newSex,newUnvsId,newPfsnId''' status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="学员信息修改身份证失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员新生信息修改接口服务处理异常!!")
def test_02_cj_student_out(self): '''测试成教学员退学申请接口''' response = BmsApi().addStudentOut() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="成教学员退学申请失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员退学申请接口服务处理异常!!")
def test_06_gk_pay_check(self): '''国开第一学期缴费审核''' response = BmsApi().reviewFee(2) status_code = response[0] code_text = response[1] zhimi_amount = response[2] self.assertEqual(status_code,200,msg="国开第一学期支付审核接口调用失败") self.assertEqual(zhimi_amount,"1960.00",msg="国开缴纳第一学期学费未送智米") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成国开第一学期支付审核接口服务处理失败!")
def test_00_cj_okConfirm(self): '''测试成教学员考前确认''' response = BmsApi().okConfirm() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="学员信息修改身份证失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员新生信息修改接口服务处理异常!!")
def test_01_cj_updateStudentScore(self): '''测试成教学员成考分数录入''' response = BmsApi().updateStudentScore() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="成教学员成考分数录入证失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员成考分数录入接口服务处理异常!!")
def test_02_cj_stdEnroll_enroll(self): '''测试成教学员录取''' response = BmsApi().enroll() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="成教学员成考分数录入失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员成考分数录入接口服务处理异常!!")
def test_04_cj_passFinancialApproval(self): '''测试成教学员退学初次审批''' response = BmsApi().passFinancialApproval() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="成教学员退学申请失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员退学申请接口服务处理异常!!")
def test_05_gk_studentchange(self): '''测试国开已缴第一学期费用转报成教''' response = BmsApi().addBdStudentChange(2) status_code = response[0] code_text = response[1] stranded_account = response[2] self.assertEqual(stranded_account, '1960', msg="国开已缴第一学期费用转报成教失败!") self.assertEqual(status_code, 200, msg="国开已缴第一学期费用转报成教失败!") self.assertEqual(code_text, '{"code":"00","body":"success","msg":"","ok":true}', msg="国开已缴第一学期费用转报成教接口服务处理异常!!")
def test_02_cj_studentchange(self): '''测试成教已缴199转报国开''' response = BmsApi().addBdStudentChange(1) status_code = response[0] code_text = response[1] coupon = response[2] self.assertEqual(coupon, 1, msg="成教学员转报国开未送199优惠券!") self.assertEqual(status_code, 200, msg="成教学员转报国开失败!") self.assertEqual(code_text, '{"code":"00","body":"success","msg":"","ok":true}', msg="成教学员转报国开接口服务处理异常!!")
def test_06_cj_passSchoolManagedApproval(self): '''测试成教学员退学终审批''' response = BmsApi().passSchoolManagedApproval() status_code = response[0] code_text = response[1] cash = response[2] self.assertEqual(status_code, 200, msg="成教学员退学申请失败!") self.assertEqual(cash, '100', msg="成教学员退学申请失败!") self.assertEqual(code_text, '{"code":"00","body":"SUCCESS","msg":"","ok":true}', msg="成教学员退学申请接口服务处理异常!!")
def test_01_cj_studentOut_applyOut_webtoken(self): '''测试成教退学页面web_token获取''' response = BmsApi().studentOut_applyOut_webtoken() status_code = response self.assertEqual(status_code, 200, msg="成教学员转报页面web_token失败!")
def test_03_cj_editToAudit(self): '''成教新生信息修改审核页面web_token获取''' response = BmsApi().cj_editToAudit() status_code = response[0] code_text = response[1] self.assertEqual(status_code, 200, msg="学员新生信息修改审核页面获取失败!")
def test_03_gk_recruit_webtoken(self): '''国开信息录入页面web_token获取''' self.assertEqual(BmsApi().toRecruitAdd(2), 200, msg="成教报读页面web_token获取成功!")
def test_01_cj_recruit_webtoken(self): '''成教信息录入页面web_token获取''' self.assertEqual(BmsApi().toRecruitAdd(1), 200,msg="成教报读页面web_token获取成功!")
def test_00_cj_studentScore_edit(self): '''测试成教学员成考分数录入页面web_token获取''' response = BmsApi().studentScore_edit_webtoken() status_code = response self.assertEqual(status_code, 200, msg="成教学员成考分数录入页面web_token失败!")
def test_01_cj_modify_webtoken(self): '''成教新生信息异动页面web_token获取''' self.assertEqual(BmsApi().cj_studentModifyAdd('CJdata','D','A'),200,msg="学员信息修改页面webtoken获取失败!")
def test_04_gk_pay_webtoken(self): '''国开第一学期支付页面web_token获取''' self.assertEqual(BmsApi().toPay(2),200,msg="国开支付页面获取失败!")
def test_01_cj_pay_webtoken(self): '''辅导费支付页面web_token获取''' self.assertEqual(BmsApi().toPay(1),200,msg="成教支付页面获取失败!")
def test_04_gk_studentchange_webtoken(self): '''测试国开学员转报页面web_token获取''' response = BmsApi().studentChange_edit_webtoken(2) status_code = response self.assertEqual(status_code, 200, msg="国开学员转报页面web_token失败!")
def test_05_cj_studentOutApproval_editToSchoolManaged_webtoken(self): '''测试成教学员退学审批页面web_token获取''' response = BmsApi().studentOutApproval_editToSchoolManaged_webtoken() status_code = response self.assertEqual(status_code, 200, msg="成教学员转报页面web_token失败!")