Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
8ba23e78
Commit
8ba23e78
authored
Apr 30, 2021
by
刘琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑线索
parent
98ba8dd9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
63 deletions
+80
-63
workspace.xml
.idea/workspace.xml
+14
-19
myNewClue_handler.py
..._crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py
+2
-1
conftest.py
script/ji_yun_ying_pc/service_crm_liuqin/conftest.py
+1
-1
test_my_new_clue.py
...g_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py
+63
-42
No files found.
.idea/workspace.xml
View file @
8ba23e78
...
@@ -19,24 +19,11 @@
...
@@ -19,24 +19,11 @@
<select
/>
<select
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"让他天天"
>
<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"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<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$/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$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.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/conftest.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/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"
/>
<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"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -277,7 +264,14 @@
...
@@ -277,7 +264,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1618380459940
</updated>
<updated>
1618380459940
</updated>
</task>
</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
/>
<servers
/>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
@@ -301,7 +295,8 @@
...
@@ -301,7 +295,8 @@
<MESSAGE
value=
"项目迁移"
/>
<MESSAGE
value=
"项目迁移"
/>
<MESSAGE
value=
"底层路径修改"
/>
<MESSAGE
value=
"底层路径修改"
/>
<MESSAGE
value=
"修改响应"
/>
<MESSAGE
value=
"修改响应"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"修改响应"
/>
<MESSAGE
value=
"查询所有线索+新增线索(必填项)+查询单个线索"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"查询所有线索+新增线索(必填项)+查询单个线索"
/>
</component>
</component>
<component
name=
"XDebuggerManager"
>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
<breakpoint-manager>
...
...
script/ji_yun_ying_pc/service_crm_liuqin/case_data_handler_liuqin/myNewClue_handler.py
View file @
8ba23e78
...
@@ -3,7 +3,7 @@ from script.ji_yun_ying_pc.service_crm_liuqin.common_liuqin.helpler import get_m
...
@@ -3,7 +3,7 @@ from script.ji_yun_ying_pc.service_crm_liuqin.common_liuqin.helpler import get_m
class
Add_My_New_Clue
():
class
Add_My_New_Clue
():
def
__init__
(
self
,
contactInfo
=
get_mobile
(),
studentName
=
"lq{}"
.
format
(
get_time
()),
belong
=
"PERSON"
,
contactType
=
"PHONE"
,
studentSex
=
"NONE"
,
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
,
homeProvinceId
=
None
,
homeProvince
=
None
,
homeCityId
=
None
,
homeCity
=
None
,
homeDistrictId
=
None
,
homeDistrict
=
None
,
homeCountyId
=
None
,
homeCounty
=
None
,
homeAddress
=
None
,
schoolId
=
None
,
schoolName
=
None
,
homeDistrict
=
None
,
homeCountyId
=
None
,
homeCounty
=
None
,
homeAddress
=
None
,
schoolId
=
None
,
schoolName
=
None
,
publicClass
=
None
,
publicTeacher
=
None
,
publicGrade
=
None
,
birthday
=
None
,
testPaperUrls
=
None
,
publicClass
=
None
,
publicTeacher
=
None
,
publicGrade
=
None
,
birthday
=
None
,
testPaperUrls
=
None
,
...
@@ -19,6 +19,7 @@ class Add_My_New_Clue():
...
@@ -19,6 +19,7 @@ class Add_My_New_Clue():
"studentSex"
:
studentSex
,
"studentSex"
:
studentSex
,
"contactType"
:
contactType
,
"contactType"
:
contactType
,
"contactInfo"
:
contactInfo
,
"contactInfo"
:
contactInfo
,
"inChargeEmployeeId"
:
inChargeEmployeeId
,
"homeProvinceId"
:
homeProvinceId
,
"homeProvinceId"
:
homeProvinceId
,
"homeProvince"
:
homeProvince
,
"homeProvince"
:
homeProvince
,
"homeCityId"
:
homeCityId
,
"homeCityId"
:
homeCityId
,
...
...
script/ji_yun_ying_pc/service_crm_liuqin/conftest.py
View file @
8ba23e78
...
@@ -19,7 +19,7 @@ def add_my_clue():
...
@@ -19,7 +19,7 @@ def add_my_clue():
@pytest.fixture
()
@pytest.fixture
()
def
query_all_following_clues
(
add_my_clue
):
def
query_all_following_clues
(
add_my_clue
):
"""查询我的线索-跟进中"""
"""查询我的线索-跟进中
,返回第一条线索信息
"""
query_data
=
{
"belong"
:
"PERSON"
,
"status"
:
"FOLLOWING"
,
"pageNum"
:
1
,
"pageSize"
:
10
,
query_data
=
{
"belong"
:
"PERSON"
,
"status"
:
"FOLLOWING"
,
"pageNum"
:
1
,
"pageSize"
:
10
,
"orderType"
:
"desc"
,
"orderField"
:
"id"
,
"schoolAreas"
:
[
3015
]}
"orderType"
:
"desc"
,
"orderField"
:
"id"
,
"schoolAreas"
:
[
3015
]}
res_query_data
=
clue_queryAll_post
(
body
=
query_data
,
header
=
jyy_header
)
res_query_data
=
clue_queryAll_post
(
body
=
query_data
,
header
=
jyy_header
)
...
...
script/ji_yun_ying_pc/service_crm_liuqin/testcase_clue/test_my_new_clue.py
View file @
8ba23e78
...
@@ -20,59 +20,80 @@ from script.ji_yun_ying_pc.service_crm_liuqin.case_data_handler_liuqin.myNewClue
...
@@ -20,59 +20,80 @@ from script.ji_yun_ying_pc.service_crm_liuqin.case_data_handler_liuqin.myNewClue
# return token
# return token
#
#
#
#
from
script.ji_yun_ying_pc.service_crm_liuqin.common_liuqin.helpler
import
get_time
,
get_mobile
class
TestMyNewClue
():
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
# json_data = Add_My_New_Clue().add_clue_data
clue_name
=
json_data
[
'studentName'
]
# clue_name=json_data['studentName']
clue_contactInfo
=
json_data
[
'contactInfo'
]
# clue_contactInfo=json_data['contactInfo']
res
=
clue_manualInputAdd_post
(
body
=
json_data
,
header
=
jyy_header
)
# 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
]}
# 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_query_data = clue_queryAll_post(body=query_phone,header=jyy_header)
res_contactInfo
=
jsonpath
(
res_query_data
,
'$..contactInfo'
)[
0
]
# 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
@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'
]
first_clue_id
=
query_all_following_clues
[
'id'
]
params_data
=
{
'clueId'
:
first_clue_id
}
params_data
=
{
'clueId'
:
first_clue_id
}
res
=
clue_query_id_get
(
params
=
params_data
,
header
=
jyy_header
)
res_clue
=
clue_query_id_get
(
params
=
params_data
,
header
=
jyy_header
)
res_clueId
=
jsonpath
(
res
,
'$..clueId'
)
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
[
'code'
]
==
0
with
assume
:
assert
res
[
'msg'
]
==
"成功"
with
assume
:
assert
res
[
'msg'
]
==
'成功'
with
assume
:
assert
res_clueId
==
first_clue_id
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment