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
326a62cb
Commit
326a62cb
authored
Jul 16, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发帖子--选择标签,医院,订单
parent
59f93653
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
143 additions
and
42 deletions
+143
-42
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
+15
-0
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
+9
-3
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
is_exist.yaml
test_backend_data/order_data/is_exist.yaml
+3
-3
list.yaml
test_backend_data/tag_data/list.yaml
+6
-4
to_hospital_list.yaml
test_backend_data/topic_data/to_hospital_list.yaml
+1
-2
No files found.
all_backend_api/order_request.py
0 → 100644
View file @
326a62cb
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 @
326a62cb
#发帖子用来判断订单是否存在的
is_exist
:
method
:
get
url
:
/api/order/is_exist
params
:
data
:
{}
json
:
{}
isLogin
:
1
all_backend_api/tag_request.py
0 → 100644
View file @
326a62cb
import
path_setting
from
in_common.base_request
import
BaseRequest
class
tag_request
(
BaseRequest
):
def
__init__
(
self
):
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"
])
\ No newline at end of file
all_backend_api/tag_request.yaml
0 → 100644
View file @
326a62cb
#发帖子&写日记&提问题--选择标签--现在默认是三级标签
list
:
method
:
get
url
:
/api/tag/list
params
:
level
:
${level}
tag_from
:
${tag_from}
data
:
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/topic_request.py
View file @
326a62cb
...
...
@@ -21,8 +21,13 @@ class topic_request(BaseRequest):
self
.
params
[
"topic_id"
]
=
topic_id
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 @
326a62cb
...
...
@@ -29,39 +29,24 @@ detail:
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
# url: /api/
diary/services
# url: /api/
topic/to_service_list
# params:
# diary_id: ${diary_id}
# service_id: ${service_id}
# data:
# 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 @
326a62cb
...
...
@@ -87,15 +87,21 @@ TRACTATE_VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate_
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_HOSIPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/topic_data"
,
"to_hospital_list.yaml"
)
# 发帖子--帖子订单选择
TRACTATE_ORDER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/order_data"
,
"is_exist.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"
)
...
...
test_backend_case/order_case/test_is_exist.py
0 → 100644
View file @
326a62cb
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 @
326a62cb
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 @
326a62cb
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_data/order_data/is_exist.yaml
View file @
326a62cb
to_service_l
ist
:
is_ex
ist
:
#帖子撰写时选择订单
-
case
:
"
帖子详情页--撰写内容时选择订单"
assert
:
0
message
:
"
美
+1"
message
:
"
"
test_backend_data/tag_data/list.yaml
View file @
326a62cb
list
:
#详情页tag选择
#详情页tag选择
--默认参数tag_from: 1
-
case
:
"
详情页--撰写内容选择标签"
case
:
"
详情页--撰写内容选择标签--发帖子&提问题"
assert
:
0
message
:
"
美
+1"
-
case
:
"
详情页--撰写内容选择标签--写日记&写回答"
assert
:
0
tag_from
:
0
test_backend_data/topic_data/to_hospital_list.yaml
View file @
326a62cb
to_
service
_list
:
to_
hospital
_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