Commit f9790429 authored by 林颖's avatar 林颖

修改被覆盖代码--回答详情页接口

parent 2629b0c6
......@@ -4,7 +4,6 @@ detail:
url: /api/answer/detail
params:
current_city_id: ${current_city_id}
data:
answer_id: ${answer_id}
json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
......
......@@ -3,20 +3,20 @@ import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.account_request import account_request
from all_backend_api.answer_request import answer_request
class TestLoginVfc:
data = BaseRequest().api_load(path_setting.LOGIN_VFC)
loginvfc_case, loginvfc_data = get_ids(data, "login_vfc")
class TestDetail:
data = BaseRequest().api_load(path_setting.DETAIL)
detail_case, detail_data = get_ids(data, "detail")
@pytest.mark.parametrize("param",loginvfc_data,ids=loginvfc_case)
def test_login_vfc(self,param):
print(param["vfc_code"])
r = account_request().login_vfc(param["current_city_id"], param["phone_num"], param["vfc_code"])
if r["error"] == 0:
assert r["data"]["account_phone"] == param["assert"]
if r["error"] == 1:
assert r["message"] == param["assert"]
@pytest.mark.parametrize("param",detail_data,ids=detail_case)
def test_detail(self,param):
# print(param["vfc_code"])
r = answer_request().detail(param["current_city_id"], param["answer_id"])
# if r["error"] == 0:
# assert r["data"]["account_phone"] == param["assert"]
# if r["error"] == 1:
# assert r["message"] == param["assert"]
......@@ -11,7 +11,7 @@ class TestQuestionV1:
data = BaseRequest().api_load(path_setting.QUESTION_DETAIL)
questionv1_case, questionv1_data = get_ids(data, "question_v1")
@pytest.mark.parametrize("param", questionv1_case, ids=questionv1_data)
@pytest.mark.parametrize("param", questionv1_data, ids=questionv1_case)
def test_question_v1(self, param):
r = hybrid_request().question_v1()
assert r["error"] == param["error"]
......
......@@ -3,6 +3,5 @@ question_v1:
-
case: "问题详情"
error: 0
assert: false
assert2: true
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-06-28 16:25:25
content: ces测试+2021-07-09 17:12:15
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
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