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
236825bb
Commit
236825bb
authored
Jul 23, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' of
http://git.wanmeizhensuo.com/dengyingying/backend_auto
into common_dev
parents
9f3c84ca
8a719179
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
327 additions
and
71 deletions
+327
-71
auto_complete_request.py
all_backend_api/auto_complete_request.py
+18
-0
auto_complete_request.yaml
all_backend_api/auto_complete_request.yaml
+18
-0
diary_request.py
all_backend_api/diary_request.py
+1
-1
order_request.py
all_backend_api/order_request.py
+13
-0
order_request.yaml
all_backend_api/order_request.yaml
+9
-0
tag_request.py
all_backend_api/tag_request.py
+9
-1
tag_request.yaml
all_backend_api/tag_request.yaml
+11
-0
topic_request.py
all_backend_api/topic_request.py
+6
-1
topic_request.yaml
all_backend_api/topic_request.yaml
+13
-29
path_setting.py
path_setting.py
+27
-5
__init__.py
test_backend_case/auto_complete_case/__init__.py
+0
-0
test_doctpr.py
test_backend_case/auto_complete_case/test_doctpr.py
+20
-0
test_hospital.py
test_backend_case/auto_complete_case/test_hospital.py
+20
-0
test_service.py
test_backend_case/diary_case/test_service.py
+14
-25
__init__.py
test_backend_case/order_case/__init__.py
+0
-0
test_is_exist.py
test_backend_case/order_case/test_is_exist.py
+19
-0
test_list.py
test_backend_case/tag_case/test_list.py
+19
-0
test_to_hospital_list.py
test_backend_case/topic_case/test_to_hospital_list.py
+19
-0
test_to_service_list.py
test_backend_case/topic_case/test_to_service_list.py
+21
-0
__init__.py
test_backend_data/auto_complete_data/__init__.py
+0
-0
doctor.yaml
test_backend_data/auto_complete_data/doctor.yaml
+8
-0
hospital.yaml
test_backend_data/auto_complete_data/hospital.yaml
+8
-0
diary_service.yaml
test_backend_data/diary_data/diary_service.yaml
+18
-9
__init__.py
test_backend_data/order_data/__init__.py
+0
-0
is_exist.yaml
test_backend_data/order_data/is_exist.yaml
+9
-0
list.yaml
test_backend_data/tag_data/list.yaml
+11
-0
to_hospital_list.yaml
test_backend_data/topic_data/to_hospital_list.yaml
+8
-0
to_service_list.yaml
test_backend_data/topic_data/to_service_list.yaml
+8
-0
No files found.
all_backend_api/auto_complete_request.py
0 → 100644
View file @
236825bb
import
path_setting
from
in_common.base_request
import
BaseRequest
class
auto_complete_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
AUTO_COMPLE_CONFIG
)
# 日记本添加医院
def
hospital
(
self
,
q
=
"1"
):
self
.
params
[
"q"
]
=
q
return
self
.
api_send
(
self
.
data
[
"hospital"
])
# 日记本添加医生
def
doctor
(
self
,
q
=
"1"
):
self
.
params
[
"q"
]
=
q
return
self
.
api_send
(
self
.
data
[
"doctor"
])
all_backend_api/auto_complete_request.yaml
0 → 100644
View file @
236825bb
#日记本详情页--添加医院[目前默认传参为1]
hospital
:
method
:
get
url
:
/api/auto_complete/hospital/
params
:
q
:
${q}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#日记本详情页--添加医生[目前默认传参为1]
doctor
:
method
:
get
url
:
/api/auto_complete/doctor/
params
:
q
:
${q}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/diary_request.py
View file @
236825bb
...
@@ -14,7 +14,7 @@ class diary_request(BaseRequest):
...
@@ -14,7 +14,7 @@ class diary_request(BaseRequest):
def
diary_cancelfavor
(
self
):
def
diary_cancelfavor
(
self
):
return
self
.
api_send
(
self
.
data
[
"cancelfavor"
])
return
self
.
api_send
(
self
.
data
[
"cancelfavor"
])
# 更新日记本
无权限
# 更新日记本
信息
def
diary_operation
(
self
,
diary_id
,
title
,
operation_timestamp
,
doctor_name
,
hospital_name
):
def
diary_operation
(
self
,
diary_id
,
title
,
operation_timestamp
,
doctor_name
,
hospital_name
):
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"title"
]
=
title
self
.
params
[
"title"
]
=
title
...
...
all_backend_api/order_request.py
0 → 100644
View file @
236825bb
import
path_setting
from
in_common.base_request
import
BaseRequest
class
order_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ORDER_CONFIG
)
# 我的订单列表
def
is_exist
(
self
):
return
self
.
api_send
(
self
.
data
[
"is_exist"
])
all_backend_api/order_request.yaml
0 → 100644
View file @
236825bb
#发帖子用来判断订单是否存在的
is_exist
:
method
:
get
url
:
/api/order/is_exist
params
:
data
:
{}
json
:
{}
isLogin
:
1
all_backend_api/tag_request.py
View file @
236825bb
import
path_setting
import
path_setting
from
in_common.base_request
import
BaseRequest
from
in_common.base_request
import
BaseRequest
class
tag_request
(
BaseRequest
):
class
tag_request
(
BaseRequest
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_CONFIG
)
#直播开播新加标签
# 进入发帖子页面-选择医院
def
list
(
self
,
level
=
3
,
tag_from
=
1
):
self
.
params
[
"level"
]
=
level
self
.
params
[
"tag_from"
]
=
tag_from
return
self
.
api_send
(
self
.
data
[
"list"
])
# 直播开播新加标签
def
tag_add
(
self
,
name
):
def
tag_add
(
self
,
name
):
self
.
params
[
"name"
]
=
name
self
.
params
[
"name"
]
=
name
return
self
.
api_send
(
self
.
data
[
"tag_add"
])
return
self
.
api_send
(
self
.
data
[
"tag_add"
])
...
...
all_backend_api/tag_request.yaml
View file @
236825bb
#发帖子&写日记&提问题--选择标签--现在默认是三级标签
list
:
method
:
get
url
:
/api/tag/list
params
:
level
:
${level}
tag_from
:
${tag_from}
data
:
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#新增标签
#新增标签
tag_add
:
tag_add
:
method
:
post
method
:
post
...
...
all_backend_api/topic_request.py
View file @
236825bb
...
@@ -21,8 +21,13 @@ class topic_request(BaseRequest):
...
@@ -21,8 +21,13 @@ class topic_request(BaseRequest):
self
.
params
[
"topic_id"
]
=
topic_id
self
.
params
[
"topic_id"
]
=
topic_id
return
self
.
api_send
(
self
.
data
[
"detail"
])
return
self
.
api_send
(
self
.
data
[
"detail"
])
# 进入发帖子页面-选择医院
def
to_hospital_list
(
self
):
return
self
.
api_send
(
self
.
data
[
"to_hospital_list"
])
# # 进入发帖子页面-选择美购--医生账号没发走暂时注释
# def to_service_list(self):
# return self.api_send(self.data["to_service_list"])
...
...
all_backend_api/topic_request.yaml
View file @
236825bb
...
@@ -29,39 +29,24 @@ detail:
...
@@ -29,39 +29,24 @@ detail:
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#发帖子--选择医院
to_hospital_list
:
method
:
get
url
:
/api/topic/to_hospital_list
params
:
data
:
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
##
日记贴相关美购--暂时没有
##
发帖子--选择美购【医生账号不走这个接口--一般用户走,医生账号没发走】--所以暂时注释掉
#to
pic_service
:
#to
_service_list
:
# method: get
# method: get
# url: /api/
diary/services
# url: /api/
topic/to_service_list
# params:
# params:
# diary_id: ${diary_id}
# service_id: ${service_id}
# data:
# data:
# json: {}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
##日记贴一级评论创建[这个是非本身日记贴:21116006]--暂时未解决复写yaml文件的问题所以单独把创建评论踢出去
#reply_create:
# method: post
# url: /api/topic/reply/create/21249632/
# params:
# channel: ${channel}
# data:
# content: ${content}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#
##日记贴二级评论创建[这个是非本身日记贴:21116006]
#sub_reply_create:
# method: post
# url: /api/topic/reply/create/21249632/
# params:
# channel: ${channel}
# data:
# content: ${content}
# replied_id: ${replied_id}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
\ No newline at end of file
path_setting.py
View file @
236825bb
...
@@ -12,12 +12,11 @@ LOGIN_VFC = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data"
...
@@ -12,12 +12,11 @@ LOGIN_VFC = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data"
# 日记本总接口配置
# 日记本总接口配置
DIARY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_request.yaml"
)
DIARY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_request.yaml"
)
#日记本详情页--字段判空
#
日记本详情页--字段判空
DIARY_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"topic_data.yaml"
)
DIARY_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"topic_data.yaml"
)
#日记本关联美购
#
日记本关联美购
DIARY_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_service.yaml"
)
DIARY_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_service.yaml"
)
# 日记本收藏&取消收藏
#日记本收藏&取消收藏
DIARY_FAVOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"favor.yaml"
)
DIARY_FAVOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"favor.yaml"
)
# 日记本修改日记信息operation--目前好像直接用接口写无权限稍后解决
# 日记本修改日记信息operation--目前好像直接用接口写无权限稍后解决
DIARY_OPERATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_operation.yaml"
)
DIARY_OPERATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_operation.yaml"
)
...
@@ -25,6 +24,13 @@ DIARY_OPERATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_d
...
@@ -25,6 +24,13 @@ DIARY_OPERATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_d
DIARY_UPDATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_update.yaml"
)
DIARY_UPDATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_update.yaml"
)
# 日记本创建添加医院-- auto_complete 总配置项
AUTO_COMPLE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"auto_complete_request.yaml"
)
AUTO_COMPLE_HOSPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/auto_complete_data"
,
"hospital.yaml"
)
# 日记本创建添加医生
AUTO_COMPLE_DOCTOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/auto_complete_data"
,
"doctor.yaml"
)
# 日记本进入相册页
# 日记本进入相册页
DIARY_ALBUM_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_diary_request.yaml"
)
DIARY_ALBUM_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_diary_request.yaml"
)
DIARY_ALBUM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"diary_album.yaml"
)
DIARY_ALBUM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"diary_album.yaml"
)
...
@@ -85,10 +91,26 @@ TRACTATE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate
...
@@ -85,10 +91,26 @@ TRACTATE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate
TRACTATE_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"vote.yaml"
)
TRACTATE_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"vote.yaml"
)
# 帖子详情页--一级评论创建
# 帖子详情页--一级评论创建
TRACTATE_PUBLISH_REPLY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"publish_reply.yaml"
)
TRACTATE_PUBLISH_REPLY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"publish_reply.yaml"
)
#发帖子--帖子内容创建
#
发帖子--帖子内容创建
TRACTATE_CREATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"create.yaml"
)
TRACTATE_CREATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"create.yaml"
)
# 发帖子--帖子医院选择
TRACTATE_HOSIPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/topic_data"
,
"to_hospital_list.yaml"
)
# 发帖子--帖子美购选择
TRACTATE_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/topic_data"
,
"to_service_list.yaml"
)
# 发帖子--帖子订单选择 --也是order的总配置项
ORDER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"order_request.yaml"
)
TRACTATE_ORDER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/order_data"
,
"is_exist.yaml"
)
# 写日记&提问题&发帖子--标签选择--也是tag的总配置项
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
DETAIL_TAG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"list.yaml"
)
# 问答详情页--问题详情
# 问答详情页--问题详情
QUESTION_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"question_v1.yaml"
)
QUESTION_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"question_v1.yaml"
)
# 问答详情页--回答列表
# 问答详情页--回答列表
...
...
test_backend_case/auto_complete_case/__init__.py
0 → 100644
View file @
236825bb
test_backend_case/auto_complete_case/test_doctpr.py
0 → 100644
View file @
236825bb
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.auto_complete_request
import
auto_complete_request
class
TestDoctor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_COMPLE_DOCTOR
)
doctor_case
,
doctor_data
=
get_ids
(
data
,
"doctor"
)
@pytest.mark.parametrize
(
"param"
,
doctor_data
,
ids
=
doctor_case
)
def
test_doctor
(
self
,
param
):
r
=
auto_complete_request
()
.
doctor
(
param
[
"q"
])
if
r
[
"error"
]
==
0
:
data
=
r
[
"data"
]
assert
len
(
data
)
>
param
[
"assert"
]
test_backend_case/auto_complete_case/test_hospital.py
0 → 100644
View file @
236825bb
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.auto_complete_request
import
auto_complete_request
class
TestDoctor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_COMPLE_HOSPITAL
)
hospital_case
,
hospital_data
=
get_ids
(
data
,
"hospital"
)
@pytest.mark.parametrize
(
"param"
,
hospital_data
,
ids
=
hospital_case
)
def
test_doctor
(
self
,
param
):
r
=
auto_complete_request
()
.
hospital
(
param
[
"q"
])
if
r
[
"error"
]
==
0
:
data
=
r
[
"data"
]
assert
len
(
data
)
>
param
[
"assert"
]
test_backend_case/diary_case/test_service.py
View file @
236825bb
...
@@ -7,36 +7,25 @@ from all_backend_api.diary_request import diary_request
...
@@ -7,36 +7,25 @@ from all_backend_api.diary_request import diary_request
class
TestDiaryService
:
class
TestDiaryService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_
DATA
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_
SERVICE
)
diary_
data_case
,
diary_data_data
=
get_ids
(
data
,
"diary_data
"
)
diary_
service_case
,
diary_service_data
=
get_ids
(
data
,
"diary_service
"
)
@pytest.mark.parametrize
(
"param"
,
diary_data_data
,
ids
=
diary_data
_case
)
@pytest.mark.parametrize
(
"param"
,
diary_service_data
,
ids
=
diary_service
_case
)
def
test_diary_service
(
self
,
param
):
def
test_diary_service
(
self
,
param
):
# print(2)
# print(2)
r
=
diary_request
()
.
diary_
data
(
param
[
"current_city_id"
],
param
[
"diary_referrer"
],
param
[
"sort"
],
param
[
"count"
],
param
[
"start_num
"
])
r
=
diary_request
()
.
diary_
service
(
param
[
"diary_id"
],
param
[
"service_id
"
])
# print(r)
# print(r)
if
r
[
"error"
]
==
0
:
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"error"
]
==
param
[
"assert"
]
# 先判断有没有日记,然后判断日记本里面需要的那些字段,如点赞字段,日记总数等,不传值,传空值
# 先判断有没有美购的字段,没有就检验接口就行,然后判断接口里面需要的那些字段是否不传值,传空值
if
r
[
"data"
]:
assert
r
[
"data"
][
0
][
"post_date"
]
is
not
None
and
r
[
"data"
][
0
][
"post_date"
]
is
not
""
#c创建时间
if
r
[
"data"
][
"service_data"
]:
assert
r
[
"data"
][
0
][
"diary_num"
]
is
not
None
and
r
[
"data"
][
0
][
"diary_num"
]
is
not
""
#日记总数
assert
r
[
"data"
][
"service_data"
][
"gengmei_price"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"gengmei_price"
]
is
not
""
# 更美价
assert
r
[
"data"
][
0
][
"view_count"
]
is
not
None
and
r
[
"data"
][
0
][
"view_count"
]
is
not
""
#浏览次数
assert
r
[
"data"
][
"service_data"
][
"service_name"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"service_name"
]
is
not
""
# 美购名称
assert
r
[
"data"
][
0
][
"is_liked"
]
is
not
None
and
r
[
"data"
][
0
][
"is_liked"
]
is
not
""
#是否点赞
assert
r
[
"data"
][
"service_data"
][
"gm_url"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"gm_url"
]
is
not
""
# 跳转链接
assert
r
[
"data"
][
0
][
"operation_day"
]
is
not
None
and
r
[
"data"
][
0
][
"operation_day"
]
is
not
""
#术后多少天
assert
r
[
"data"
][
"service_data"
][
"is_seckill"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"is_seckill"
]
is
not
""
# 是否秒杀
assert
r
[
"data"
][
0
][
"vote_count"
]
is
not
None
and
r
[
"data"
][
0
][
"vote_count"
]
is
not
""
#点赞总数
assert
r
[
"data"
][
0
][
"reply_count"
]
is
not
None
and
r
[
"data"
][
0
][
"reply_count"
]
is
not
""
#评论总数
assert
r
[
"data"
][
0
][
"id"
]
is
not
None
and
r
[
"data"
][
0
][
"id"
]
is
not
""
#日记贴id
# 判断评论列表里面的用户信息是否为空,先判断有没有评论
if
r
[
"data"
][
0
][
"comments"
]:
assert
r
[
"data"
][
0
][
"comments"
][
0
][
"user_id"
]
is
not
None
and
r
[
"data"
][
0
][
"comments"
][
0
][
"user_id"
]
is
not
""
#用户id
assert
r
[
"data"
][
0
][
"comments"
][
0
][
"nick_name"
]
is
not
None
and
r
[
"data"
][
0
][
"comments"
][
0
][
"nick_name"
]
is
not
""
#用户名
assert
r
[
"data"
][
0
][
"comments"
][
0
][
"gm_url"
]
is
not
None
and
r
[
"data"
][
0
][
"comments"
][
0
][
"gm_url"
]
is
not
""
#点击头像跳转链接
# assert(r[""])
if
r
[
"error"
]
==
1
:
assert
r
[
"error"
]
==
param
[
"assert"
]
...
...
test_backend_case/order_case/__init__.py
0 → 100644
View file @
236825bb
test_backend_case/order_case/test_is_exist.py
0 → 100644
View file @
236825bb
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.order_request
import
order_request
class
TestIsExist
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_ORDER
)
is_exsit_case
,
is_exsit_data
=
get_ids
(
data
,
"is_exist"
)
@pytest.mark.parametrize
(
"param"
,
is_exsit_data
,
ids
=
is_exsit_case
)
def
test_is_exsit
(
self
,
param
):
r
=
order_request
()
.
is_exist
()
assert
r
[
"error"
]
==
0
assert
r
[
"data"
][
"result"
]
is
True
# if r["error"] == 0:
# assert r["data"]["result"] is True
\ No newline at end of file
test_backend_case/tag_case/test_list.py
0 → 100644
View file @
236825bb
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.tag_request
import
tag_request
class
TestList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL_TAG
)
tag_list_case
,
tag_list_data
=
get_ids
(
data
,
"list"
)
@pytest.mark.parametrize
(
"param"
,
tag_list_data
,
ids
=
tag_list_case
)
def
test_to_hospital_list
(
self
,
param
):
r
=
tag_request
()
.
list
()
assert
r
[
"error"
]
==
0
assert
len
(
r
[
"data"
])
>
0
# if r["error"] == 0:
# assert r["data"]["result"] is True
\ No newline at end of file
test_backend_case/topic_case/test_to_hospital_list.py
0 → 100644
View file @
236825bb
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.topic_request
import
topic_request
class
TestT0HospitalList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_HOSIPITAL
)
to_hospital_list_case
,
to_hospital_list_data
=
get_ids
(
data
,
"to_hospital_list"
)
@pytest.mark.parametrize
(
"param"
,
to_hospital_list_data
,
ids
=
to_hospital_list_case
)
def
test_to_hospital_list
(
self
,
param
):
r
=
topic_request
()
.
to_hospital_list
()
assert
r
[
"error"
]
==
0
assert
len
(
r
[
"data"
])
>
0
# if r["error"] == 0:
# assert r["data"]["result"] is True
\ No newline at end of file
test_backend_case/topic_case/test_to_service_list.py
0 → 100644
View file @
236825bb
# 等之后把用户账号和医生账号切换了再写上去--目前医生不走这个接口
# import pytest
# from ids_list import get_ids
# import path_setting
# from in_common.base_request import BaseRequest
# from all_backend_api.topic_request import topic_request
#
#
# class TestToServiceList:
# data = BaseRequest().api_load(path_setting.TRACTATE_SERVICE)
# to_service_list_case, to_service_list_data = get_ids(data,"to_service_list")
#
# @pytest.mark.parametrize("param", to_service_list_data, ids=to_service_list_case)
# def test_to_hospital_list(self,param):
# r = topic_request().to_service_list()
# assert r["error"] == 0 # 这个接口没啥可以校验的,简单的不报错就行。
#
# # assert len(r["data"]) > 0
# # if r["error"] == 0:
# # assert r["data"]["result"] is True
\ No newline at end of file
test_backend_data/auto_complete_data/__init__.py
0 → 100644
View file @
236825bb
test_backend_data/auto_complete_data/doctor.yaml
0 → 100644
View file @
236825bb
doctor
:
#收藏case--无须字段
-
case
:
"
日记本添加医生--数据检验"
q
:
"
2"
assert
:
0
test_backend_data/auto_complete_data/hospital.yaml
0 → 100644
View file @
236825bb
hospital
:
#收藏case--无须字段
-
case
:
"
日记本添加医院--数据检验"
q
:
"
1"
assert
:
0
test_backend_data/diary_data/diary_service.yaml
View file @
236825bb
diary_service
:
diary_service
:
#字段正常case
#字段正常case
-
-
case
:
"
有推荐美购的日记
--有外显评论
"
case
:
"
有推荐美购的日记"
diary_id
:
"
"
diary_id
:
17586147
service_id
:
58
15774
service_id
:
58
78139
assert
:
0
assert
:
0
-
-
case
:
"
接口传参数失败,但不报错case"
case
:
"
已下线的推荐美购的日记"
current_city_id
:
"
beijing"
diary_id
:
17586094
diary_referrer
:
"
my_diary"
service_id
:
5885050
sort
:
0
count
:
8
start_num
:
2
assert
:
0
assert
:
0
-
case
:
"
没有推荐美购的日记"
diary_id
:
17586140
service_id
:
assert
:
0
test_backend_data/order_data/__init__.py
0 → 100644
View file @
236825bb
test_backend_data/order_data/is_exist.yaml
0 → 100644
View file @
236825bb
is_exist
:
#帖子撰写时选择订单
-
case
:
"
帖子详情页--撰写内容时选择订单"
assert
:
0
message
:
"
"
test_backend_data/tag_data/list.yaml
0 → 100644
View file @
236825bb
list
:
#详情页tag选择--默认参数tag_from: 1
-
case
:
"
详情页--撰写内容选择标签--发帖子&提问题"
assert
:
0
message
:
"
美
+1"
-
case
:
"
详情页--撰写内容选择标签--写日记&写回答"
assert
:
0
tag_from
:
0
test_backend_data/topic_data/to_hospital_list.yaml
0 → 100644
View file @
236825bb
to_hospital_list
:
#帖子撰写时选择医院
-
case
:
"
帖子详情页--撰写内容时选择医院"
assert
:
0
message
:
"
美
+1"
test_backend_data/topic_data/to_service_list.yaml
0 → 100644
View file @
236825bb
to_service_list
:
#帖子撰写时选择美购
-
case
:
"
帖子详情页--撰写内容时选择购买过的美购"
assert
:
0
message
:
"
美
+1"
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