Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
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
邓莹莹
backend_auto
Commits
d541b757
Commit
d541b757
authored
Jun 07, 2021
by
陈雪
Browse files
Options
Browse Files
Download
Plain Diff
修改冲突
parents
adc66539
7171bf3d
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
423 additions
and
4 deletions
+423
-4
conversation_request.py
all_backend_api/conversation_request.py
+7
-0
conversation_request.yaml
all_backend_api/conversation_request.yaml
+13
-2
filter_request.py
all_backend_api/filter_request.py
+23
-0
filter_request.yaml
all_backend_api/filter_request.yaml
+11
-0
search_request.py
all_backend_api/search_request.py
+18
-0
search_request.yaml
all_backend_api/search_request.yaml
+15
-2
web_request.py
all_doctor_api/web_request.py
+23
-0
web_request.yaml
all_doctor_api/web_request.yaml
+45
-0
host.yaml
host.yaml
+3
-0
path_setting.py
path_setting.py
+21
-0
test_detail_messageid.py
test_backend_case/conversation_case/test_detail_messageid.py
+19
-0
__init__.py
test_backend_case/filter_case/__init__.py
+0
-0
test_service_home_city_v2.py
test_backend_case/filter_case/test_service_home_city_v2.py
+19
-0
test_hospital.py
test_backend_case/search_case/test_hospital.py
+19
-0
detail_messageid.yaml
test_backend_data/conversation_data/detail_messageid.yaml
+8
-0
__init__.py
test_backend_data/filter_data/__init__.py
+0
-0
service_home_city_v2.yaml
test_backend_data/filter_data/service_home_city_v2.yaml
+14
-0
hospital.yaml
test_backend_data/search_data/hospital.yaml
+17
-0
test_conversation.py
test_doctor_case/web_case/test_conversation.py
+22
-0
test_conversation_coupon.py
test_doctor_case/web_case/test_conversation_coupon.py
+20
-0
test_conversation_diary.py
test_doctor_case/web_case/test_conversation_diary.py
+22
-0
test_conversation_unread_list.py
test_doctor_case/web_case/test_conversation_unread_list.py
+22
-0
test_service.py
test_doctor_case/web_case/test_service.py
+22
-0
conversation.yaml
test_doctor_data/web_data/conversation.yaml
+8
-0
conversation_coupon.yaml
test_doctor_data/web_data/conversation_coupon.yaml
+12
-0
conversation_diary.yaml
test_doctor_data/web_data/conversation_diary.yaml
+6
-0
conversation_unread_list.yaml
test_doctor_data/web_data/conversation_unread_list.yaml
+7
-0
service.yaml
test_doctor_data/web_data/service.yaml
+7
-0
No files found.
all_backend_api/conversation_request.py
View file @
d541b757
...
@@ -13,9 +13,16 @@ class conversation_request(BaseRequest):
...
@@ -13,9 +13,16 @@ class conversation_request(BaseRequest):
self
.
params
[
"message_ids"
]
=
message_ids
self
.
params
[
"message_ids"
]
=
message_ids
return
self
.
api_send
(
self
.
messageread
[
"message_read"
])
return
self
.
api_send
(
self
.
messageread
[
"message_read"
])
def
detail_messageid
(
self
,
os_version
,
last_msg_id
,
offset_msg_id
):
self
.
params
[
"os_version"
]
=
os_version
self
.
params
[
"last_msg_id"
]
=
last_msg_id
self
.
params
[
"offset_msg_id"
]
=
offset_msg_id
return
self
.
api_send
(
self
.
messageread
[
"detail_messageid"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
print
(
conversation_request
()
.
detail_messageid
(
10
,
0
,
0
))
...
...
all_backend_api/conversation_request.yaml
View file @
d541b757
...
@@ -9,4 +9,16 @@ message_read:
...
@@ -9,4 +9,16 @@ message_read:
message_ids
:
${message_ids}
message_ids
:
${message_ids}
json
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
isLogin
:
1
#需要登录的接口
\ No newline at end of file
detail_messageid
:
method
:
get
url
:
/api/conversation/detail/602329_33910245/
params
:
os_version
:
${os_version}
last_msg_id
:
${last_msg_id}
offset_msg_id
:
${offset_msg_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
all_backend_api/filter_request.py
0 → 100644
View file @
d541b757
import
path_setting
from
in_common.base_request
import
BaseRequest
class
filter_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
FILTER_CONFIG
)
def
service_home_city_v2
(
self
,
current_city_id
,
lat
,
lng
):
print
(
"fgx"
)
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"lat"
]
=
lat
self
.
params
[
"lng"
]
=
lng
return
self
.
api_send
(
self
.
data
[
"service_home_city_v2"
])
if
__name__
==
'__main__'
:
#城市筛选器
print
(
filter_request
()
.
service_home_city_v2
(
""
,
"40.002"
,
"116.487252"
))
print
(
"fgx"
)
all_backend_api/filter_request.yaml
0 → 100644
View file @
d541b757
service_home_city_v2
:
method
:
GET
url
:
/api/filter/service_home_city_v2
params
:
current_city_id
:
${current_city_id}
lat
:
${lat}
lng
:
${lng}
data
:
{}
json
:
{}
all_backend_api/search_request.py
View file @
d541b757
...
@@ -4,6 +4,9 @@ from in_common.base_request import BaseRequest
...
@@ -4,6 +4,9 @@ from in_common.base_request import BaseRequest
class
search_request
(
BaseRequest
):
class
search_request
(
BaseRequest
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDS_CONFIG
)
#品类聚合页面医生tab列表
self
.
data
=
self
.
api_load
(
path_setting
.
HOSPITAL_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDS_CONFIG
)
#keywords路径
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDS_CONFIG
)
#keywords路径
self
.
data
=
self
.
api_load
(
path_setting
.
CONTENTV6_CONFIG
)
#content_v6路径
self
.
data
=
self
.
api_load
(
path_setting
.
CONTENTV6_CONFIG
)
#content_v6路径
self
.
data
=
self
.
api_load
(
path_setting
.
HOT_CONFIG
)
# hot路径
self
.
data
=
self
.
api_load
(
path_setting
.
HOT_CONFIG
)
# hot路径
...
@@ -38,3 +41,18 @@ class search_request(BaseRequest):
...
@@ -38,3 +41,18 @@ class search_request(BaseRequest):
def
hot
(
self
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
hot
(
self
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"hot"
])
return
self
.
api_send
(
self
.
data
[
"hot"
])
# 品类聚合页面医生tab列表
def
hospital
(
self
,
cp_id
,
tag_id
,
q
,
count
,
device_id
):
self
.
params
[
"cp_id"
]
=
cp_id
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"q"
]
=
q
self
.
params
[
"count"
]
=
count
self
.
params
[
"device_id"
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"hospital"
])
if
__name__
==
'__main__'
:
# 打印购物车-猜你喜欢列表接口返回
print
(
search_request
()
.
hospital
(
82
,
[],
"眼部整形"
,
10
,
"869378034450718"
))
all_backend_api/search_request.yaml
View file @
d541b757
...
@@ -35,4 +35,17 @@ hot:
...
@@ -35,4 +35,17 @@ hot:
url
:
/api/search/hot
url
:
/api/search/hot
#列出所有定义函数时的参数
#列出所有定义函数时的参数
params
:
params
:
version
:
${version}
version
:
${version}
\ No newline at end of file
#品类聚合页面医生tab列表
hospital
:
method
:
get
url
:
/api/search/v2/hospital
params
:
cp_id
:
${cp_id}
tag_id
:
${tag_id}
q
:
${q}
count
:
${count}
device_id
:
${device_id}
data
:
{}
json
:
{}
\ No newline at end of file
all_doctor_api/web_request.py
View file @
d541b757
...
@@ -20,8 +20,25 @@ class web_request(BaseRequest):
...
@@ -20,8 +20,25 @@ class web_request(BaseRequest):
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_offline"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_offline"
])
def
conversation
(
self
,
is_star
,
page
):
self
.
params
[
"is_star"
]
=
is_star
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation"
])
def
conversation_unread_list
(
self
,
page
):
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_unread_list"
])
def
service
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service"
])
def
conversation_diary
(
self
,
doctor_user_id
):
self
.
params
[
"doctor_user_id"
]
=
doctor_user_id
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_diary"
])
def
conversation_coupon
(
self
,
doctor_user_id
):
self
.
params
[
"doctor_user_id"
]
=
doctor_user_id
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_coupon"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
@@ -29,3 +46,9 @@ if __name__ == '__main__':
...
@@ -29,3 +46,9 @@ if __name__ == '__main__':
print
(
web_request
()
.
article_videotoken
())
print
(
web_request
()
.
article_videotoken
())
print
(
web_request
()
.
doctor_submechanisms
())
print
(
web_request
()
.
doctor_submechanisms
())
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web_request
()
.
conversation
(
0
,
1
))
print
(
web_request
()
.
conversation_unread_list
(
1
))
print
(
web_request
()
.
service
())
print
(
"发送"
)
print
(
web_request
()
.
conversation_diary
(
602329
))
print
(
web_request
()
.
conversation_coupon
(
602329
))
all_doctor_api/web_request.yaml
View file @
d541b757
...
@@ -36,3 +36,48 @@ service_offline:
...
@@ -36,3 +36,48 @@ service_offline:
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
json
:
{}
isLogin
:
1
isLogin
:
1
conversation
:
method
:
get
url
:
/api/web/conversation
params
:
is_star
:
${is_star}
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
conversation_unread_list
:
method
:
get
url
:
/api/web/conversation/unread_list
params
:
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
service
:
method
:
get
url
:
/api/web/service
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
conversation_diary
:
method
:
get
url
:
/api/web/conversation/diary
params
:
doctor_user_id
:
${doctor_user_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
conversation_coupon
:
method
:
get
url
:
/api/web/conversation/coupon
params
:
doctor_user_id
:
${doctor_user_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
host.yaml
View file @
d541b757
develop_host
:
develop_host
:
backend
:
http://backend.paas-develop.env
backend
:
http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
# doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
# backend: https://backend.igengmei.com
path_setting.py
View file @
d541b757
...
@@ -138,6 +138,7 @@ MY_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/my_conv
...
@@ -138,6 +138,7 @@ MY_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/my_conv
#消息
#消息
MESSAGE_READ_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"conversation_request.yaml"
)
MESSAGE_READ_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"conversation_request.yaml"
)
MESSAGE_READ
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"message_read.yaml"
)
MESSAGE_READ
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"message_read.yaml"
)
DETAIL_MESSAGEID
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"detail_messageid.yaml"
)
#消息页未读数
#消息页未读数
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
...
@@ -241,6 +242,26 @@ REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_d
...
@@ -241,6 +242,26 @@ REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_d
#回答详情页
#回答详情页
DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"answer_request.yaml"
)
DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"answer_request.yaml"
)
DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/answer_data"
,
"detail.yaml"
)
DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/answer_data"
,
"detail.yaml"
)
#品类聚合页面医生tab列表
HOSPITAL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
HOSPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"hospital.yaml"
)
#城市筛选器
FILTER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"filter_request.yaml"
)
FILTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/filter_data"
,
"service_home_city_v2.yaml"
)
#医生后台-全部私信列表
CONVERSATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation.yaml"
)
#医生后台-未读私信列表
CONVERSATIONUNREADLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_unread_list.yaml"
)
#医生后台-发送商品按钮
SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"service.yaml"
)
#医生后台-发送案例
CONVERSATIONDIARY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_diary.yaml"
)
#医生后台-发送优惠券
CONVERSATIONCOUPON
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_coupon.yaml"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
test_backend_case/conversation_case/test_detail_messageid.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.conversation_request
import
conversation_request
class
TestDetailMessageid
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL_MESSAGEID
)
detailmessageid_case
,
detailmessageid_data
=
get_ids
(
data
,
"detail_messageid"
)
@pytest.mark.parametrize
(
"param"
,
detailmessageid_data
,
ids
=
detailmessageid_case
)
def
test_detail_messageid
(
self
,
param
):
r
=
conversation_request
()
.
detail_messageid
(
param
[
"os_version"
],
param
[
"last_msg_id"
],
param
[
"offset_msg_id"
])
if
r
[
"error"
]
==
0
:
results
=
r
.
get
(
"data"
)
.
get
(
"results"
,
[])
assert
len
(
results
)
<=
param
[
"assert"
]
test_backend_case/filter_case/__init__.py
0 → 100644
View file @
d541b757
test_backend_case/filter_case/test_service_home_city_v2.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.filter_request
import
filter_request
class
TestServiceHomeCityV2
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FILTER
)
servicehomecityv2_case
,
servicehomecityv2_data
=
get_ids
(
data
,
"service_home_city_v2"
)
@pytest.mark.parametrize
(
"param"
,
servicehomecityv2_data
,
ids
=
servicehomecityv2_case
)
def
test_service_home_city_v2
(
self
,
param
):
r
=
filter_request
()
.
service_home_city_v2
(
param
[
"current_city_id"
],
param
[
"lat"
],
param
[
"lng"
])
# print('feng=', r)
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"area"
])
>
0
test_backend_case/search_case/test_hospital.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.search_request
import
search_request
class
TestHospital
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
HOSPITAL
)
hospital_case
,
hospital_data
=
get_ids
(
data
,
"hospital"
)
@pytest.mark.parametrize
(
"param"
,
hospital_data
,
ids
=
hospital_case
)
def
test_hospital
(
self
,
param
):
r
=
search_request
()
.
hospital
(
param
[
"cp_id"
],
param
[
"tag_id"
],
param
[
"q"
],
param
[
"count"
],
param
[
"device_id"
])
# print('feng=', r)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
]
!=
param
[
"assert"
]
test_backend_data/conversation_data/detail_messageid.yaml
0 → 100644
View file @
d541b757
detail_messageid
:
#验证成功case
-
case
:
"
私信详情页最新一页的消息内容"
os_version
:
10
last_msg_id
:
0
offset_msg_id
:
0
assert
:
20
test_backend_data/filter_data/__init__.py
0 → 100644
View file @
d541b757
test_backend_data/filter_data/service_home_city_v2.yaml
0 → 100644
View file @
d541b757
#城市筛选器
service_home_city_v2
:
-
case
:
"
城市筛选器接口"
current_city_id
:
"
"
lat
:
"
40.002"
lng
:
"
116.487252"
assert
:
0
test_backend_data/search_data/hospital.yaml
0 → 100644
View file @
d541b757
hospital
:
#品类聚合页医生tab
-
case
:
"
品类聚合页面医生tab"
assert
:
null
cp_id
:
82
tag_id
:
[]
q
:
"
眼部整形"
count
:
10
device_id
:
869378034450718
test_doctor_case/web_case/test_conversation.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestConversation
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATION
)
conversation_case
,
conversation_data
=
get_ids
(
data
,
"conversation"
)
@pytest.mark.parametrize
(
"param"
,
conversation_data
,
ids
=
conversation_case
)
def
test_conversation
(
self
,
param
):
'''全部私信列表'''
r
=
web_request
()
.
conversation
(
param
[
"is_star"
],
param
[
"page"
])
if
r
[
"error"
]
==
0
:
conversation
=
r
.
get
(
"data"
)
.
get
(
"conversation"
,
[])
assert
len
(
conversation
)
<=
param
[
"assert"
]
assert
r
[
"data"
][
"size"
]
<=
param
[
"assert_size"
]
test_doctor_case/web_case/test_conversation_coupon.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATIONCOUPON
)
conversationcoupon_case
,
conversationcoupon_data
=
get_ids
(
data
,
"conversation_coupon"
)
@pytest.mark.parametrize
(
"param"
,
conversationcoupon_data
,
ids
=
conversationcoupon_case
)
def
test_conversation_coupon
(
self
,
param
):
'''发送美券按钮'''
r
=
web_request
()
.
conversation_coupon
(
param
[
"doctor_user_id"
])
if
r
[
"error"
]
==
0
:
data1
=
r
.
get
(
"data"
,
[])
assert
len
(
data1
)
>=
param
[
"assert"
]
test_doctor_case/web_case/test_conversation_diary.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestConversationDiary
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATIONDIARY
)
conversationdiary_case
,
conversationdiary_data
=
get_ids
(
data
,
"conversation_diary"
)
@pytest.mark.parametrize
(
"param"
,
conversationdiary_data
,
ids
=
conversationdiary_case
)
def
test_conversation_diary
(
self
,
param
):
'''点击发送案例按钮'''
r
=
web_request
()
.
conversation_diary
(
param
[
"doctor_user_id"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
data
=
r
.
get
(
"data"
,
[])
assert
len
(
data
)
>=
param
[
"assert"
]
test_doctor_case/web_case/test_conversation_unread_list.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestConversationUnreadList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATIONUNREADLIST
)
unreadlist_case
,
unreadlist_data
=
get_ids
(
data
,
"conversation_unread_list"
)
@pytest.mark.parametrize
(
"param"
,
unreadlist_data
,
ids
=
unreadlist_case
)
def
test_conversation_unread_list
(
self
,
param
):
'''未读私信列表'''
r
=
web_request
()
.
conversation_unread_list
(
param
[
"page"
])
if
r
[
"error"
]
==
0
:
conversation
=
r
.
get
(
"data"
)
.
get
(
"conversation"
,
[])
assert
len
(
conversation
)
<=
param
[
"assert"
]
assert
r
[
"data"
][
"size"
]
<=
param
[
"assert_size"
]
test_doctor_case/web_case/test_service.py
0 → 100644
View file @
d541b757
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE
)
service_case
,
service_data
=
get_ids
(
data
,
"service"
)
@pytest.mark.parametrize
(
"param"
,
service_data
,
ids
=
service_case
)
def
test_service
(
self
,
param
):
'''未读私信列表'''
r
=
web_request
()
.
service
()
if
r
[
"error"
]
==
0
:
data
=
r
.
get
(
"data"
)
.
get
(
"data"
,
[])
assert
len
(
data
)
<=
param
[
"assert"
]
assert
r
[
"data"
][
"size"
]
<=
param
[
"assert_size"
]
test_doctor_data/web_data/conversation.yaml
0 → 100644
View file @
d541b757
conversation
:
#全部私信case
-
case
:
"
请求成功,有数据返回的第一页数据"
is_star
:
0
page
:
1
assert_size
:
10
assert
:
10
test_doctor_data/web_data/conversation_coupon.yaml
0 → 100644
View file @
d541b757
conversation_coupon
:
#私信点击发送优惠券case
-
case
:
"
点击私信发送优惠券按钮"
doctor_user_id
:
"
602329"
assert
:
0
-
case
:
"
点击私信发送优惠券按钮接口报错"
doctor_user_id
:
"
602329"
assert
:
0
assert_message
:
'
缺少参数:
doctor_user_id'
assert_data
:
None
test_doctor_data/web_data/conversation_diary.yaml
0 → 100644
View file @
d541b757
conversation_diary
:
#私信点击发送案例case
-
case
:
"
点击私信发送案例按钮"
doctor_user_id
:
602329
assert
:
0
test_doctor_data/web_data/conversation_unread_list.yaml
0 → 100644
View file @
d541b757
conversation_unread_list
:
#未读私信case
-
case
:
"
请求成功,有未读消息"
page
:
1
assert_size
:
10
assert
:
10
test_doctor_data/web_data/service.yaml
0 → 100644
View file @
d541b757
service
:
#私信点击发送商品case
-
case
:
"
点击私信发送商品按钮"
#page: 1
assert_size
:
10
assert
:
10
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