Commit 89397b26 authored by huangqiang's avatar huangqiang

增加发送邮件2

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