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
d8b8f2b8
Commit
d8b8f2b8
authored
Jun 04, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日记相关
parent
5c3893ec
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
273 additions
and
5 deletions
+273
-5
diary_album.yaml
all_backend_api/diary_album.yaml
+8
-0
diary_album_request.py
all_backend_api/diary_album_request.py
+11
-0
diary_cancelfavor.yaml
all_backend_api/diary_cancelfavor.yaml
+1
-1
diary_cancelfavor_request.py
all_backend_api/diary_cancelfavor_request.py
+1
-1
diary_operation.yaml
all_backend_api/diary_operation.yaml
+25
-0
diary_operation_request.py
all_backend_api/diary_operation_request.py
+38
-0
diary_update.yaml
all_backend_api/diary_update.yaml
+9
-0
diary_update_request.py
all_backend_api/diary_update_request.py
+16
-0
path_setting.py
path_setting.py
+14
-0
test_diary_albun.py
test_backend_case/diary_case/test_diary_albun.py
+25
-0
test_diary_cancel.py
test_backend_case/diary_case/test_diary_cancel.py
+2
-2
test_diary_operation.py
test_backend_case/diary_case/test_diary_operation.py
+25
-0
test_diary_update.py
test_backend_case/diary_case/test_diary_update.py
+32
-0
diary_album.yaml
test_backend_data/diary/diary_album.yaml
+14
-0
diary_cancelfavor.yaml
test_backend_data/diary/diary_cancelfavor.yaml
+1
-1
diary_operation.yaml
test_backend_data/diary/diary_operation.yaml
+30
-0
diary_update.yaml
test_backend_data/diary/diary_update.yaml
+21
-0
No files found.
all_backend_api/diary_album.yaml
0 → 100644
View file @
d8b8f2b8
#查看日记本相册页面
album
:
method
:
get
url
:
/hybrid/diary/album/17586198/_data
params
:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/diary_album_request.py
0 → 100644
View file @
d8b8f2b8
import
path_setting
from
in_common.base_request
import
BaseRequest
class
diary_album_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
DIARY_ALBUM_CONFIG
)
def
diary_album
(
self
):
return
self
.
api_send
(
self
.
data
[
"album"
])
all_backend_api/diary_cancelfavor.yaml
View file @
d8b8f2b8
...
...
@@ -6,7 +6,7 @@ cancelfavor:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#cancelfavor:
# method: delte
# url: /api/diary/favor/17586195
...
...
all_backend_api/diary_cancelfavor_request.py
View file @
d8b8f2b8
...
...
@@ -10,7 +10,7 @@ class diary_cancelfavor_request(BaseRequest):
def
diary_cancelfavor
(
self
):
return
self
.
api_send
(
self
.
data
[
"cancelfavor"
])
#
all_backend_api/diary_operation.yaml
0 → 100644
View file @
d8b8f2b8
#日记本修改信息
operation
:
method
:
post
url
:
/api/diary/additional_info/v2
params
:
data
:
diary_id
:
${diary_id}
title
:
${title}
operation_timestamp
:
${operation_timestamp}
doctor_name
:
${doctor_name}
hospital_name
:
${hospital_name}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#查看日记修改信息页面
additional_info
:
method
:
get
url
:
/api/diary/operation/17586198/
params
:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/diary_operation_request.py
0 → 100644
View file @
d8b8f2b8
import
path_setting
from
in_common.base_request
import
BaseRequest
class
diary_operation_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
DIARY_OPERATION_CONFIG
)
def
diary_operation
(
self
,
diary_id
,
title
,
operation_timestamp
,
doctor_name
,
hospital_name
):
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"title"
]
=
title
self
.
params
[
"operation_timestamp"
]
=
operation_timestamp
self
.
params
[
"doctor_name"
]
=
doctor_name
self
.
params
[
"hospital_name"
]
=
hospital_name
return
self
.
api_send
(
self
.
data
[
"operation"
])
def
diary_additional_info
(
self
):
return
self
.
api_send
(
self
.
data
[
"operation"
])
# def __init__(self):
# self.data = self.api_load(path_setting.DIARY_OPERATION_RESULT_CONFIG)
#
# def diary_additional_info(self):
# return self.api_send(self.data["diary_additional_info"])
# if __name__ == '__main__':
# print(conversation_request().message_read("beijing", 1,'[10622,10626,10646,10651]'))
all_backend_api/diary_update.yaml
0 → 100644
View file @
d8b8f2b8
#更新日记本的修改信息
update
:
method
:
post
url
:
/api/diary/update_v2/17586198
params
:
data
:
topic_list
:
${topic_list}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/diary_update_request.py
0 → 100644
View file @
d8b8f2b8
import
path_setting
from
in_common.base_request
import
BaseRequest
class
diary_update_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
DIARY_UPDATE_CONFIG
)
def
diary_update
(
self
,
topic_list
):
self
.
params
[
"topic_list"
]
=
topic_list
return
self
.
api_send
(
self
.
data
[
"update"
])
path_setting.py
View file @
d8b8f2b8
...
...
@@ -26,6 +26,20 @@ DIARY_ISFAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary", "
DIARY_CANCELFAVOR_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_cancelfavor.yaml"
)
DIARY_CANCELFAVOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary"
,
"diary_cancelfavor.yaml"
)
# 日记本修改日记信息operation--目前好像直接用接口写无权限稍后解决
DIARY_OPERATION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_operation.yaml"
)
DIARY_OPERATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary"
,
"diary_operation.yaml"
)
# 日记本创建日记贴信息-
DIARY_UPDATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_update.yaml"
)
DIARY_UPDATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary"
,
"diary_update.yaml"
)
# 日记本进入相册页
DIARY_ALBUM_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_album.yaml"
)
DIARY_ALBUM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary"
,
"diary_album.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
test_backend_case/diary_case/test_diary_albun.py
0 → 100644
View file @
d8b8f2b8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.diary_album_request
import
diary_album_request
class
TestDiaryAlbum
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_ALBUM
)
diary_album_case
,
diary_album_data
=
get_ids
(
data
,
"diary_album"
)
@pytest.mark.parametrize
(
"param"
,
diary_album_data
,
ids
=
diary_album_case
)
def
test_diary_album
(
self
,
param
):
r
=
diary_album_request
()
.
diary_album
()
# print(r)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
2
][
"images"
][
0
][
"is_cover"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
0
][
"images"
][
0
][
"is_cover"
]
==
param
[
"assert2"
]
test_backend_case/diary_case/test_diary_cancel.py
View file @
d8b8f2b8
...
...
@@ -17,10 +17,10 @@ class TestDiaryCancelfavor:
if
r
[
"error"
]
==
0
:
assert
r
[
"message"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert2"
]
assert
r
[
"message"
]
==
param
[
"assert2"
]
#
test_backend_case/diary_case/test_diary_operation.py
0 → 100644
View file @
d8b8f2b8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.diary_operation_request
import
diary_operation_request
class
TestDiaryOperation
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_OPERATION
)
diary_operation_case
,
diary_operation_data
=
get_ids
(
data
,
"diary_operation"
)
@pytest.mark.parametrize
(
"param"
,
diary_operation_data
,
ids
=
diary_operation_case
)
def
test_diary_operation
(
self
,
param
):
r
=
diary_operation_request
()
.
diary_operation
(
param
[
"diary_id"
],
param
[
"title"
],
param
[
"operation_timestamp"
],
param
[
"doctor_name"
],
param
[
"hospital_name"
])
result
=
diary_operation_request
()
.
diary_additional_info
()
if
result
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
# if r["error"] == 1:
# assert r["message"] ==param["assert2"]
#
test_backend_case/diary_case/test_diary_update.py
0 → 100644
View file @
d8b8f2b8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.diary_update_request
import
diary_update_request
class
TestDiaryUpdate
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_UPDATE
)
diary_update_case
,
diary_update_data
=
get_ids
(
data
,
"diary_update"
)
@pytest.mark.parametrize
(
"param"
,
diary_update_data
,
ids
=
diary_update_case
)
def
test_diary_update
(
self
,
param
):
r
=
diary_update_request
()
.
diary_update
(
param
[
"topic_list"
])
# print(r)
# if r["error"] == 0:
# assert r["message"] == param["assert"]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
# 收藏之后取消收藏
# r1 = diary_isfavor_request().diary_cancelfavor()
# if r["error"] == 0:
# assert r["error"] == param["assert"]
test_backend_data/diary/diary_album.yaml
0 → 100644
View file @
d8b8f2b8
diary_album
:
#进入日记本相册case--无须字段
-
case
:
"
进入日记本相册case"
assert
:
false
assert2
:
true
#
#diary_cancelfavor:
#-
# case: "取消收藏case"
# assert: "已取消收藏"
test_backend_data/diary/diary_cancelfavor.yaml
View file @
d8b8f2b8
...
...
@@ -6,7 +6,7 @@ diary_cancelfavor:
assert2
:
"
请登录后再试"
#
#diary_cancelfavor:
#-
# case: "取消收藏case"
...
...
test_backend_data/diary/diary_operation.yaml
0 → 100644
View file @
d8b8f2b8
diary_operation
:
#修改日记本信息case--
-
case
:
"
修改信息"
diary_id
:
17586198
title
:
"
上海哈哈哈哈哈哈哈哈哈哈哈虎骨"
operation_timestamp
:
1620662400
doctor_name
:
"
也一样"
hospital_name
:
"
一样一样"
assert
:
"
没有权限"
-
case
:
"
将原来的修改内容修改回去,方便下次接着使用"
diary_id
:
17586198
title
:
"
测试"
operation_timestamp
:
1620662401
doctor_name
:
"
测试"
hospital_name
:
"
测试"
assert
:
"
没有权限"
#
#diary_cancelfavor:
#-
# case: "取消收藏case"
# assert: "已取消收藏"
test_backend_data/diary/diary_update.yaml
0 → 100644
View file @
d8b8f2b8
diary_update
:
#创建更新日记本信息case--创建新的日记贴
-
case
:
"
发布成功--校验"
topic_list
:
'
[{"content":"呵呵呵呵呵","images":[{"image":"2021/06/04/1545/b9ed9f0dc883"}],"operation_timestamp":"1622792725"}]'
status
:
true
assert
:
"
没有权限"
isLogin
:
1
#
#diary_cancelfavor:
#-
# case: "取消收藏case"
# assert: "已取消收藏"
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