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
19ce88a2
Commit
19ce88a2
authored
Aug 13, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改日记本修改信息遗漏点
parent
93b5915a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
diary_request.py
all_backend_api/diary_request.py
+3
-3
diary_request.yaml
all_backend_api/diary_request.yaml
+3
-3
test_operation.py
test_backend_case/diary_case/test_operation.py
+7
-5
diary_operation.yaml
test_backend_data/diary_data/diary_operation.yaml
+3
-1
No files found.
all_backend_api/diary_request.py
View file @
19ce88a2
...
@@ -15,16 +15,16 @@ class diary_request(BaseRequest):
...
@@ -15,16 +15,16 @@ class diary_request(BaseRequest):
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_
additional_info
(
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
self
.
params
[
"operation_timestamp"
]
=
operation_timestamp
self
.
params
[
"operation_timestamp"
]
=
operation_timestamp
self
.
params
[
"doctor_name"
]
=
doctor_name
self
.
params
[
"doctor_name"
]
=
doctor_name
self
.
params
[
"hospital_name"
]
=
hospital_name
self
.
params
[
"hospital_name"
]
=
hospital_name
return
self
.
api_send
(
self
.
data
[
"
operation
"
])
return
self
.
api_send
(
self
.
data
[
"
additional_info
"
])
# 添加信息--待争议
# 添加信息--待争议
def
diary_
additional_info
(
self
):
def
diary_
operation
(
self
):
return
self
.
api_send
(
self
.
data
[
"operation"
])
return
self
.
api_send
(
self
.
data
[
"operation"
])
# 详情页-内容
# 详情页-内容
...
...
all_backend_api/diary_request.yaml
View file @
19ce88a2
...
@@ -18,7 +18,7 @@ cancelfavor:
...
@@ -18,7 +18,7 @@ cancelfavor:
#
#
#日记本修改信息
#日记本修改信息
operation
:
additional_info
:
method
:
post
method
:
post
url
:
/api/diary/additional_info/v2
url
:
/api/diary/additional_info/v2
params
:
params
:
...
@@ -34,8 +34,8 @@ operation:
...
@@ -34,8 +34,8 @@ operation:
#查看日记修改信息页面
#
查看日记修改信息页面
additional_info
:
operation
:
method
:
get
method
:
get
url
:
/api/diary/operation/17586147/
url
:
/api/diary/operation/17586147/
params
:
params
:
...
...
test_backend_case/diary_case/test_operation.py
View file @
19ce88a2
...
@@ -8,13 +8,15 @@ from all_backend_api.diary_request import diary_request
...
@@ -8,13 +8,15 @@ from all_backend_api.diary_request import diary_request
class
TestDiaryOperation
:
class
TestDiaryOperation
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_OPERATION
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_OPERATION
)
diary_operation_case
,
diary_operation_data
=
get_ids
(
data
,
"diary_
operation
"
)
diary_operation_case
,
diary_operation_data
=
get_ids
(
data
,
"diary_
additional_info
"
)
@pytest.mark.parametrize
(
"param"
,
diary_operation_data
,
ids
=
diary_operation_case
)
@pytest.mark.parametrize
(
"param"
,
diary_operation_data
,
ids
=
diary_operation_case
)
def
test_diary_operation
(
self
,
param
):
def
test_diary_operation
(
self
,
param
):
r
=
diary_request
()
.
diary_operation
(
param
[
"diary_id"
],
param
[
"title"
],
param
[
"operation_timestamp"
],
param
[
"doctor_name"
],
param
[
"hospital_name"
])
r
=
diary_request
()
.
diary_additional_info
(
param
[
"diary_id"
],
param
[
"title"
],
param
[
"operation_timestamp"
],
param
[
"doctor_name"
],
param
[
"hospital_name"
])
result
=
diary_request
()
.
diary_additional_info
()
result
=
diary_request
()
.
diary_operation
()
if
result
[
"error"
]
==
1
:
assert
r
[
"error"
]
==
param
[
"assert1"
]
assert
r
[
"message"
]
==
param
[
"assert"
]
assert
result
[
"error"
]
==
param
[
"assert1"
]
# if result["error"] == 1:
# assert r["message"] == param["assert"]
# if r["error"] == 1:
# if r["error"] == 1:
# assert r["message"] ==param["assert2"]
# assert r["message"] ==param["assert2"]
...
...
test_backend_data/diary_data/diary_operation.yaml
View file @
19ce88a2
diary_
operation
:
diary_
additional_info
:
#修改日记本信息case--
#修改日记本信息case--
-
-
case
:
"
修改信息"
case
:
"
修改信息"
...
@@ -8,6 +8,7 @@ diary_operation:
...
@@ -8,6 +8,7 @@ diary_operation:
doctor_name
:
"
也一样"
doctor_name
:
"
也一样"
hospital_name
:
"
一样一样"
hospital_name
:
"
一样一样"
assert
:
"
没有权限"
assert
:
"
没有权限"
assert1
:
0
-
-
...
@@ -18,6 +19,7 @@ diary_operation:
...
@@ -18,6 +19,7 @@ diary_operation:
doctor_name
:
"
测试"
doctor_name
:
"
测试"
hospital_name
:
"
测试"
hospital_name
:
"
测试"
assert
:
"
没有权限"
assert
:
"
没有权限"
assert1
:
0
...
...
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