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
f9790429
Commit
f9790429
authored
Jul 09, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改被覆盖代码--回答详情页接口
parent
2629b0c6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
16 deletions
+14
-16
answer_request.yaml
all_backend_api/answer_request.yaml
+0
-1
test_detail.py
test_backend_case/answer_case/test_detail.py
+12
-12
test_question_v1.py
test_backend_case/hybrid_case/test_question_v1.py
+1
-1
question_v1.yaml
test_backend_data/hybrid_data/question_v1.yaml
+0
-1
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-1
No files found.
all_backend_api/answer_request.yaml
View file @
f9790429
...
...
@@ -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是不需要登录的情况,如不需要登录,可以不添加这个字段
...
...
test_backend_case/answer_case/test_detail.py
View file @
f9790429
...
...
@@ -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.a
ccount_request
import
account
_request
from
all_backend_api.a
nswer_request
import
answer
_request
class
Test
LoginVfc
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
LOGIN_VFC
)
loginvfc_case
,
loginvfc_data
=
get_ids
(
data
,
"login_vfc
"
)
class
Test
Detail
:
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
=
a
ccount_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
=
a
nswer_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"]
test_backend_case/hybrid_case/test_question_v1.py
View file @
f9790429
...
...
@@ -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"
]
...
...
test_backend_data/hybrid_data/question_v1.yaml
View file @
f9790429
...
...
@@ -3,6 +3,5 @@ question_v1:
-
case
:
"
问题详情"
error
:
0
assert
:
false
assert2
:
true
test_backend_data/topic_data/topic_reply_create.yaml
View file @
f9790429
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-0
6-28 16:25:2
5
content
:
ces测试+2021-0
7-09 17:12:1
5
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
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