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
456751f2
Commit
456751f2
authored
Jul 23, 2021
by
冯艮霞
Browse files
Options
Browse Files
Download
Plain Diff
我的-收藏-tab
parents
edf059f6
a475b175
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
192 additions
and
7 deletions
+192
-7
user_request.py
all_backend_api/user_request.py
+39
-2
user_request.yaml
all_backend_api/user_request.yaml
+36
-0
path_setting.py
path_setting.py
+13
-1
test_favors_diaries.py
test_backend_case/user_case/test_favors_diaries.py
+18
-0
test_favors_topics.py
test_backend_case/user_case/test_favors_topics.py
+18
-0
test_my_answer.py
test_backend_case/user_case/test_my_answer.py
+18
-0
favors_diaries.yaml
test_backend_data/user_data/favors_diaries.yaml
+16
-0
favors_services.yaml
test_backend_data/user_data/favors_services.yaml
+2
-2
favors_topics.yaml
test_backend_data/user_data/favors_topics.yaml
+16
-0
my_answer.yaml
test_backend_data/user_data/my_answer.yaml
+14
-0
my_question.yaml
test_backend_data/user_data/my_question.yaml
+2
-2
No files found.
all_backend_api/user_request.py
View file @
456751f2
...
...
@@ -75,7 +75,7 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"reply_tractate"
])
# 我的-问题
# 我的-问题
-提问
def
my_question
(
self
,
start_num
,
count
):
self
.
params
[
"start_num"
]
=
start_num
...
...
@@ -84,7 +84,7 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"my_question"
])
# 我的-收藏
# 我的-收藏
-商品
def
favors_services
(
self
,
start_num
,
count
,
current_city_id
,
device_id
,
version
):
self
.
params
[
"start_num"
]
=
start_num
...
...
@@ -95,6 +95,32 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"favors_services"
])
# 我的-问题-回答
def
my_answer
(
self
,
start_num
,
count
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"my_answer"
])
# 我的-收藏-日记本
def
favors_diaries
(
self
,
start_num
,
count
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"favors_diaries"
])
# 我的-收藏-日记贴
def
favors_topics
(
self
,
start_num
,
count
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"favors_topics"
])
if
__name__
==
'__main__'
:
#个人中心
...
...
@@ -123,4 +149,15 @@ if __name__ == '__main__':
#我的-帖子-我回复的
print
(
user_request
()
.
reply_tractate
(
1
,
10
,
"7.46.0"
))
# 我的-问题-回答
print
(
user_request
()
.
my_answer
(
0
,
10
))
# 我的-收藏-日记本
print
(
user_request
()
.
favors_diaries
(
0
,
10
))
# 我的-收藏-日记贴
print
(
user_request
()
.
favors_topics
(
0
,
10
))
all_backend_api/user_request.yaml
View file @
456751f2
...
...
@@ -121,3 +121,39 @@ reply_tractate:
isLogin
:
1
# 我的-问题-回答
my_answer
:
method
:
GET
url
:
/api/user/my_answer
params
:
start_num
:
${start_num}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-收藏-日记本
favors_diaries
:
method
:
GET
url
:
/api/user/favors/diaries
params
:
start_num
:
${start_num}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-收藏-日记贴
favors_topics
:
method
:
GET
url
:
/api/user/favors/topics
params
:
start_num
:
${start_num}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
path_setting.py
View file @
456751f2
...
...
@@ -650,7 +650,7 @@ USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
MY_QUESTION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
MY_QUESTION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"my_question.yaml"
)
#我的-收藏
#我的-收藏
-日记本
FAVORS_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FAVORS_SERVICES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"favors_services.yaml"
)
...
...
@@ -658,6 +658,18 @@ FAVORS_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
REPLY_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
REPLY_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"reply_tractate.yaml"
)
#我的-问题-回答
MY_ANSWER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
MY_ANSWER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"my_answer.yaml"
)
#我的-收藏-日记本
FAVORS_DIARIES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FAVORS_DIARIES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"favors_diaries.yaml"
)
#我的-收藏-日记贴
FAVORS_TOPICS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FAVORS_TOPICS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"favors_topics.yaml"
)
#直播-新增标签
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
TAG_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"tag_add.yaml"
)
...
...
test_backend_case/user_case/test_favors_diaries.py
0 → 100644
View file @
456751f2
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestFavorsDiaries
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FAVORS_DIARIES
)
favors_diaries_case
,
favors_diaries_data
=
get_ids
(
data
,
"favors_diaries"
)
@pytest.mark.parametrize
(
"param"
,
favors_diaries_data
,
ids
=
favors_diaries_case
)
def
test_favors_diaries
(
self
,
param
):
r
=
user_request
()
.
favors_diaries
(
param
[
"start_num"
],
param
[
"count"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_favors_topics.py
0 → 100644
View file @
456751f2
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestFavorsTopics
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FAVORS_TOPICS
)
favors_topics_case
,
favors_topics_data
=
get_ids
(
data
,
"favors_topics"
)
@pytest.mark.parametrize
(
"param"
,
favors_topics_data
,
ids
=
favors_topics_case
)
def
test_favors_topics
(
self
,
param
):
r
=
user_request
()
.
favors_topics
(
param
[
"start_num"
],
param
[
"count"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_my_answer.py
0 → 100644
View file @
456751f2
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestMyAnswer
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MY_ANSWER
)
my_answer_case
,
my_answer_data
=
get_ids
(
data
,
"my_answer"
)
@pytest.mark.parametrize
(
"param"
,
my_answer_data
,
ids
=
my_answer_case
)
def
test_my_answer
(
self
,
param
):
r
=
user_request
()
.
my_answer
(
param
[
"start_num"
],
param
[
"count"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_data/user_data/favors_diaries.yaml
0 → 100644
View file @
456751f2
favors_diaries
:
#我的-收藏-日记本
-
case
:
"
我的页面-收藏-日记本"
start_num
:
0
count
:
10
assert
:
0
test_backend_data/user_data/favors_services.yaml
View file @
456751f2
favors_services
:
#我的-收藏
#我的-收藏
-商品
-
case
:
"
我的页面-收藏"
case
:
"
我的页面-收藏
-商品
"
start_num
:
0
count
:
10
current_city_id
:
"
beijing"
...
...
test_backend_data/user_data/favors_topics.yaml
0 → 100644
View file @
456751f2
favors_topics
:
#我的-收藏-日记贴
-
case
:
"
我的页面-收藏-日记贴"
start_num
:
0
count
:
10
assert
:
0
test_backend_data/user_data/my_answer.yaml
0 → 100644
View file @
456751f2
my_answer
:
#我的-问题-回答
-
case
:
"
我的页面-问题-回答"
start_num
:
0
count
:
10
assert
:
0
test_backend_data/user_data/my_question.yaml
View file @
456751f2
my_question
:
#我的-问题
#我的-问题
-提问
-
case
:
"
我的页面-问题"
case
:
"
我的页面-问题
-提问
"
start_num
:
0
count
:
10
assert
:
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