Commit 19ce88a2 authored by 林颖's avatar 林颖

修改日记本修改信息遗漏点

parent 93b5915a
......@@ -15,16 +15,16 @@ class diary_request(BaseRequest):
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["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"])
return self.api_send(self.data["additional_info"])
# 添加信息--待争议
def diary_additional_info(self):
def diary_operation(self):
return self.api_send(self.data["operation"])
# 详情页-内容
......
......@@ -18,7 +18,7 @@ cancelfavor:
#
#日记本修改信息
operation:
additional_info:
method: post
url: /api/diary/additional_info/v2
params:
......@@ -34,8 +34,8 @@ operation:
#查看日记修改信息页面
additional_info:
# 查看日记修改信息页面
operation:
method: get
url: /api/diary/operation/17586147/
params:
......
......@@ -8,13 +8,15 @@ from all_backend_api.diary_request import diary_request
class TestDiaryOperation:
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)
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"])
result = diary_request().diary_additional_info()
if result["error"] == 1:
assert r["message"] == param["assert"]
r = diary_request().diary_additional_info(param["diary_id"], param["title"], param["operation_timestamp"], param["doctor_name"], param["hospital_name"])
result = diary_request().diary_operation()
assert r["error"] == param["assert1"]
assert result["error"] == param["assert1"]
# if result["error"] == 1:
# assert r["message"] == param["assert"]
# if r["error"] == 1:
# assert r["message"] ==param["assert2"]
......
diary_operation:
diary_additional_info:
#修改日记本信息case--
-
case: "修改信息"
......@@ -8,6 +8,7 @@ diary_operation:
doctor_name: "也一样"
hospital_name: "一样一样"
assert: "没有权限"
assert1: 0
-
......@@ -18,6 +19,7 @@ diary_operation:
doctor_name: "测试"
hospital_name: "测试"
assert: "没有权限"
assert1: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment