class eval_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) ##提交评测作品 def save_stu_evaluation(self, data): url = self.caps[ 'eval'] + '/api/m/auth/paint/v200929/save_stu_evaluation.htm' response = self.re.post(url=url, data=data) return response ##查询我的折扣 def query_my_discounts(self, data): url = self.caps[ 'eval'] + '/api/m/auth/paint/v200929/query_my_discounts.htm' response = self.re.post(url=url, data=data) return response # 提交评画订单 def commit_evaluation_order(self, data): url = self.caps[ 'eval'] + '/api/m/auth/paint/v200929/commit_evaluation_order.htm' response = self.re.post(url=url, data=data) return response
class school_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) ##视频打回,输入当前账号密码 def pwdAuth(self, data): """ :param data: authCode:账户密码; optRemark:备注 """ url = self.caps['school'] + '/auth/school/examstatistic/pwdAuth.htm' response = self.re.post(url=url, data=data) return response ##视频打回 def resetVideo(self, data): """ :param data: svId:考生科目视频唯一标记 token:院校账户token optRemark:备注 :return: """ url = self.caps['school'] + '/auth/school/examstatistic/resetVideo.htm' response = self.re.post(url=url, data=data) return response
class userProject: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) # 登录接口App登录 def stuLogin(self, data=''): url = self.caps['user'] + "/login" response = self.re.post(url=url, data=data) return response # 提交考生个人信息 def save_stuinfo(self, data=''): url = self.caps['user'] + '/api/m/auth/user/save_stuinfo.htm' response = self.re.post(url=url, data=data) return response # 上传报考资料 def uploadStuPhoto(self, data=''): url = self.caps['23000'] + "/api/m/auth/service/v191119/upload_auth_res.ws" headers = { "platformType": "2", "udid": "1519fbbacd907027e734fbf8b17b2a7a", "tkn": "yx001", "yks": "1" } response = self.re.post(url=url, headers=headers, data=data) return response # 提交报考资料 def submitStuInfo(self, data=''): url = self.caps['23000'] + "/api/m/auth/service/v191119/commit_auth_res.ws" response = self.re.post(url=url, data=data) return response
class platRaw: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) self.plat_data = VideoSchema_Data.platData() # 平台登录 def plat_login(self, data=None): url = self.caps['college'] + '/login' if data is None: response = self.re.post(url=url, data=Account.yuanXiao) self.ticket = response['ticket'] else: response = self.re.post(url=url, data=data) self.ticket = response['ticket'] return response # 院校后台查询对应考试视频 def schoolQueryVideo(self): url = self.caps['examVideo'] + '/auth/school/assignDetail/loadExaminerAssignDetailData.htm' datas = { "data": self.plat_data.schoolQueryVideo, "ticket": self.ticket } response = self.re.post(url=url, data=datas) return response # 创建考生 def createStu(self, data=''): url = self.caps['user'] + '/auth/admin/user/saveUser.htm' response = self.re.post(url=url, data=data) return response
class audit_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) # 客服主管查询考生psid def query_psId(self, data=''): url = self.caps['audit'] + '/auth/admin/audit/auditListData.htm' response = self.re.post(url=url, data=data) return response # 对考试资料进行审核 def check_stuInfo(self, data=''): url = self.caps['audit'] + '/auth/admin/audit/auditAction.htm' response = self.re.post(url=url, data=data) return response # 照片复审查询 def auditListData(self, data): """ idcardNo:身份证号 """ url = self.caps['audit'] + '/auth/school/audit/auditListData.htm' response = self.re.post(url=url, data=data) return response
class college_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) # 平台登录 def login(self, data=''): url = self.caps['college'] + '/login' if data == '': response = self.re.post(url=url, data=Account.yuanXiao) else: response = self.re.post(url=url, data=data) return response
class pay_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) ##提交支付 def pay(self, orderId): url = self.caps[ 'pay'] + '/pay/alipay/testnotify.htm?orderId= %d' % orderId response = self.re.get(url=url) return response
class prob_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) # 省份分数线查询 def loadProvinceScoreLineData(self, data=''): url = self.caps[ 'prob'] + '/auth/prob/provinceScoreLine/loadProvinceScoreLineData.htm' response = self.re.post(url=url, data=data) return response # 统考计算公式 def loadJointScoreExpressionData(self, data=''): url = self.caps[ 'prob'] + '/auth/prob/jointScoreExpression/loadJointScoreExpressionData.htm' response = self.re.post(url=url, data=data) return response ##获取App统考成绩列表 def getUser(self, data=''): url = self.caps['prob'] + '/api/m/auth/wish/user/v200630/getUser.ws' response = self.re.post(url=url, data=data) return response # 获取校考成绩列表 def addSchoolExamList(self, data=''): url = self.caps[ 'prob'] + '/api/m/auth/schoolExamList/v200630/addSchoolExamList.ws' response = self.re.post(url=url, data=data) return response # 获取校考计算公式 def loadSchoolScoreExpressionData(self, data=''): url = self.caps[ 'prob'] + '/auth/prob/schoolScoreExpression/loadSchoolScoreExpressionData.htm' response = self.re.post(url=url, data=data) return response
class examVideo_project: def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) ##考试结果查询,视频列表 def loadExaminerAssignDetailData(self, data): """ showSubject showSchedule kaoShiID kaoDianID riChengId riChengID """ url = self.caps[ 'examVideo'] + '/auth/school/assignDetail/loadExaminerAssignDetailData.htm' response = self.re.post(url=url, data=data) return response
def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment)
from Interface_Yss.Common.Base_Request import Base_requests from Interface_Yss.project.user import userProject re = Base_requests() user = userProject(environment='online') stu_data = { "loginName": 'haitun2', "password": "******" } stu_res = user.stuLogin(data=stu_data) ticket = stu_res['ticket'] url = 'https://user.artstudent.cn/auth/student/qualify/verifyUserInfo.htm' payload = { 'enterProfPage': '+AND+1%3D1+--+', 'ticket': ticket, } res = re.post(url=url, data=payload) if __name__ == "__main__": print(res)
def __init__(self, environment): self.re = Base_requests() self.caps = Caps(env=environment) self.plat_data = VideoSchema_Data.platData()
def test_sendMessage(self): re = Base_requests() url = ''