Commit 89397b26 authored by huangqiang's avatar huangqiang

增加发送邮件2

parent 0db045b0
{
"studentName": "",
"studentPrimPhoneNo": "",
"studentPrimPhoneNo": "19900000000",
"primBelong": "爸爸",
"studentSecondaryPhoneNo": "",
"secondaryBelong": "",
"studentSex": "男",
"attendSchool": "",
"attendGrade": "三年级",
"birthday": "2019-08-04",
"birthday": "2010-08-04",
"studentSource": "营销口碑",
"introducer": "黄弓",
"introducerId": 10140033,
......
......@@ -17,19 +17,15 @@ def get_token():
return common.readconf("token", "token")
def get_student_data(attendSchool, schoolArea=3015, entrancePaper="", introducer="", introducerId=None):
def get_student_data(attendSchool, entrancePaper=None, introducer=None, introducerId=None):
num_name = random.randint(0, 10000)
num_phone = random.randint(10000000, 90000000)
student_name = "自动" + str(num_name)
num_phone = "197%s" % num_phone
with open("reception/data/student_data.json", encoding="utf-8") as fp:
student_data = json.load(fp)
student_data["studentName"] = student_name
student_data["studentPrimPhoneNo"] = num_phone
student_data["introducer"] = introducer
student_data["introducerId"] = introducerId
student_data["attendSchool"] = attendSchool
student_data["schoolArea"] = schoolArea
student_data["entrancePaper"] = entrancePaper
return student_data
......@@ -37,9 +33,16 @@ def get_student_data(attendSchool, schoolArea=3015, entrancePaper="", introducer
def is_skip():
flag = None
host = common.readconf("host", "host")
if host == "geek.jkwljy.com" or host == "132.232.15.12":
if host == "geek.jkwljy.com":
flag = True
else:
flag = False
return flag
def get_phone():
with open("reception/data/student_data.json", encoding="utf-8") as fp:
student_data = json.load(fp)
phone = student_data["studentPrimPhoneNo"]
return phone
......@@ -3,31 +3,33 @@ config:
# base_url: ${get_host()}
teststeps:
-
name: 查询员工信息接口
api: api/login_empliyee_info.yml
-
name: 防重复提交接口
# setup_hooks:
# - ${test($request)}
teardown_hooks:
- ${test($response)}
# teardown_hooks:
# - ${test($response)}
api: api/all_check_recommit.yml
-
name: 查询公立学校接口
skip: 跳过
api: api/apply_query_public_school.yml
variables:
schoolName: 成都市
-
name: 查询手机号绑定学生接口
skip: "没有原因"
api: api/apply_phone_bounding.yml
variables:
new_phone: ""
new_phone: ${get_phone()}
-
name: 查询学生信息接口
skip: 跳过
api: api/apply_student_info.yml
variables:
studentName: "黄弓"
......@@ -37,14 +39,15 @@ teststeps:
-
name: 上传文件(试卷)接口
skipIf: None
skipIf: ${is_skip()}
api: api/apply_upload_file.yml
variables:
userId: 8223
userId: $employeeId
-
name: 新建学生接口
skipIf: None
# skipIf: ${is_skip()}
skipIf: True
api: api/apply_student_new.yml
variables:
student_data: ${get_student_data($public_school_name,entrancePaper=$file_url)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment