Commit 8ba23e78 authored by 刘琴's avatar 刘琴

编辑线索

parent 98ba8dd9
......@@ -19,24 +19,11 @@
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="54f4d37d-1724-4813-a1e2-24e200088c5f" name="Default Changelist" comment="让他天天">
<change afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/common_liuqin/__init__.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/common_liuqin/helpler.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/conftest.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/__init__.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/jk_interface_test.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/jk_interface_test.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_4_12,_11_11_[Default_Changelist]1/shelved.patch" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_4_12__11_11__Default_Changelist_1.xml" beforeDir="false" />
<list default="true" id="54f4d37d-1724-4813-a1e2-24e200088c5f" name="Default Changelist" comment="查询所有线索+新增线索(必填项)+查询单个线索">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/create_case.py" beforeDir="false" afterPath="$PROJECT_DIR$/create_case.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/conftest.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/conftest.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/defalut_account.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/defalut_account.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/test_clue/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/xin_project_patriarch_app/xin_static/xin_user/jky_user.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/script/xin_project_patriarch_app/xin_static/xin_user/jky_user.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/xin_project_patriarch_app/xin_static/xin_user/patriarch_user" beforeDir="false" afterPath="$PROJECT_DIR$/script/xin_project_patriarch_app/xin_static/xin_user/patriarch_user" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/conftest.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/conftest.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -277,7 +264,14 @@
<option name="project" value="LOCAL" />
<updated>1618380459940</updated>
</task>
<option name="localTasksCounter" value="6" />
<task id="LOCAL-00006" summary="查询所有线索+新增线索(必填项)+查询单个线索">
<created>1619698276809</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1619698276810</updated>
</task>
<option name="localTasksCounter" value="7" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -301,7 +295,8 @@
<MESSAGE value="项目迁移" />
<MESSAGE value="底层路径修改" />
<MESSAGE value="修改响应" />
<option name="LAST_COMMIT_MESSAGE" value="修改响应" />
<MESSAGE value="查询所有线索+新增线索(必填项)+查询单个线索" />
<option name="LAST_COMMIT_MESSAGE" value="查询所有线索+新增线索(必填项)+查询单个线索" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......
......@@ -3,7 +3,7 @@ from script.ji_yun_ying_pc.service_crm_liuqin.common_liuqin.helpler import get_m
class Add_My_New_Clue():
def __init__(self,contactInfo=get_mobile(),studentName="lq{}".format(get_time()),belong="PERSON",contactType="PHONE",studentSex="NONE",
collectPerson="刘琴1", createSchoolAreaId=3015,introduceStudentNo=None,otherRemark=None,
collectPerson="黄强测试人员", inChargeEmployeeId=8223,createSchoolAreaId=3015,introduceStudentNo=None,otherRemark=None,
homeProvinceId=None,homeProvince=None,homeCityId=None,homeCity=None,homeDistrictId=None,
homeDistrict=None,homeCountyId=None,homeCounty=None,homeAddress=None,schoolId=None,schoolName=None,
publicClass=None,publicTeacher=None,publicGrade=None,birthday=None,testPaperUrls=None,
......@@ -19,6 +19,7 @@ class Add_My_New_Clue():
"studentSex": studentSex,
"contactType": contactType,
"contactInfo": contactInfo,
"inChargeEmployeeId":inChargeEmployeeId,
"homeProvinceId": homeProvinceId,
"homeProvince": homeProvince,
"homeCityId":homeCityId ,
......
......@@ -19,7 +19,7 @@ def add_my_clue():
@pytest.fixture()
def query_all_following_clues(add_my_clue):
"""查询我的线索-跟进中"""
"""查询我的线索-跟进中,返回第一条线索信息"""
query_data = {"belong": "PERSON", "status": "FOLLOWING", "pageNum": 1, "pageSize": 10,
"orderType": "desc", "orderField": "id", "schoolAreas": [3015]}
res_query_data = clue_queryAll_post(body=query_data,header=jyy_header)
......
......@@ -20,59 +20,80 @@ from script.ji_yun_ying_pc.service_crm_liuqin.case_data_handler_liuqin.myNewClue
# return token
#
#
from script.ji_yun_ying_pc.service_crm_liuqin.common_liuqin.helpler import get_time, get_mobile
class TestMyNewClue():
"""
测试“我的新线索”
"""
def test_add_new_clue_success(self):
# def test_add_new_clue_success(self):
# 新增线索成功
json_data = Add_My_New_Clue().add_clue_data
clue_name=json_data['studentName']
clue_contactInfo=json_data['contactInfo']
res = clue_manualInputAdd_post(body=json_data,header=jyy_header)
query_phone={"belong":"PERSON","status":"FOLLOWING","pageNum":1,"pageSize":10,"studentName":clue_contactInfo,"orderType":"desc","orderField":"id","schoolAreas":[3015]}
res_query_data = clue_queryAll_post(body=query_phone,header=jyy_header)
res_contactInfo=jsonpath(res_query_data,'$..contactInfo')[0]
# json_data = Add_My_New_Clue().add_clue_data
# clue_name=json_data['studentName']
# clue_contactInfo=json_data['contactInfo']
# res = clue_manualInputAdd_post(body=json_data,header=jyy_header)
#
# query_phone={"belong":"PERSON","status":"FOLLOWING","pageNum":1,"pageSize":10,"studentName":clue_contactInfo,"orderType":"desc","orderField":"id","schoolAreas":[3015]}
# res_query_data = clue_queryAll_post(body=query_phone,header=jyy_header)
# res_contactInfo=jsonpath(res_query_data,'$..contactInfo')[0]
#
#
# with assume:assert res['code']==0
# with assume:assert res['msg']=='成功'
# with assume:assert res_contactInfo==clue_contactInfo
with assume:assert res['code']==0
with assume:assert res['msg']=='成功'
with assume:assert res_contactInfo==clue_contactInfo
#
#
#
# def test_edit_my_new_clue(self):
# """编辑线索"""
# res = clue_manualInputEdit_post(header=jyy_header)
def test_query_following_clue(self):
"""
查询所有【我的新线索-跟进中】线索
"""
query_data={"belong":"PERSON","status":"FOLLOWING","pageNum":1,"pageSize":10,"orderType":"desc","orderField":"id","schoolAreas":[3015]}
res = clue_queryAll_post(body=query_data,header=jyy_header)
with assume:assert res['code']==0
with assume:assert res['msg']=="成功"
@pytest.mark.usefixtures
def test_query_single_clue(self,query_all_following_clues):
"""
查询单个线索
"""
def test_edit_my_new_clue(self,query_all_following_clues):
"""编辑线索"""
# 查询第一条线索id
first_clue_id = query_all_following_clues['id']
params_data = {'clueId':first_clue_id}
res = clue_query_id_get(params=params_data,header=jyy_header)
res_clueId = jsonpath(res,'$..clueId')
params_data = {'clueId': first_clue_id}
res_clue = clue_query_id_get(params=params_data, header=jyy_header)
edit_data = res_clue['data']
print(edit_data)
# 用第一条线索的返回值,作为编辑线索的data
edit_data['studentName']='liuqin修改{}'.format(get_time())
edit_data['contactInfo']=get_mobile()
res = clue_manualInputEdit_post(body=edit_data,header=jyy_header)
res_contactInfo = jsonpath(res,'$..contactInfo')[0]
res_studentName = jsonpath(res,'$..studentName')[0]
with assume:assert res['code']==0
with assume:assert res['msg']=="成功"
with assume:assert res_clueId==first_clue_id
with assume:assert res['msg']=='成功'
with assume:assert res_contactInfo==edit_data['contactInfo']
with assume:assert res_studentName==edit_data['studentName']
# def test_query_all_following_clue(self):
# """
# 查询所有【我的新线索-跟进中】线索
# """
# # query_data={"belong":"PERSON","status":"FOLLOWING","pageNum":1,"pageSize":10,"orderType":"desc","orderField":"id","schoolAreas":[3015]}
# query_data={"belong":"PERSON","status":"FOLLOWING","pageNum":1,"pageSize":10,"inChargeEmployeeId":8223,"orderType":"desc","orderField":"id","distribution":0}
# res = clue_queryAll_post(body=query_data,header=jyy_header)
#
# with assume:assert res['code']==0
# with assume:assert res['msg']=="成功"
#
# @pytest.mark.usefixtures
# def test_query_single_clue(self,query_all_following_clues):
# """
# 查询单个线索
# """
# first_clue_id = query_all_following_clues['id']
# params_data = {'clueId':first_clue_id}
# res = clue_query_id_get(params=params_data,header=jyy_header)
# res_clueId = jsonpath(res,'$..clueId')
#
# with assume:assert res['code']==0
# with assume:assert res['msg']=="成功"
# with assume:assert res_clueId==first_clue_id
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