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
832af755
Commit
832af755
authored
May 20, 2021
by
冯艮霞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fgx_dev' into common_dev
parents
51e7844a
eb5e12d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
2 deletions
+69
-2
feed_request.py
all_backend_api/feed_request.py
+16
-2
feed_request.yaml
all_backend_api/feed_request.yaml
+14
-0
path_setting.py
path_setting.py
+6
-0
test_community.py
test_backend_case/feed_case/test_community.py
+23
-0
community.yaml
test_backend_data/feed_data/community.yaml
+10
-0
No files found.
all_backend_api/feed_request.py
View file @
832af755
...
...
@@ -6,6 +6,8 @@ class feed_request(BaseRequest):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
FEED_INDEXV9_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
CONFIG_LIST_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
COMMUNITY_CONFIG
)
def
index_v9
(
self
,
tabtype
,
version
,
current_city_id
):
self
.
params
[
"tabtype"
]
=
tabtype
...
...
@@ -20,9 +22,21 @@ class feed_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"config_list"
])
# 社区tab页feed流
def
community
(
self
,
version
,
tabtype
,
tags_id
,
tab_id
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"tabtype"
]
=
tabtype
self
.
params
[
"tags_id"
]
=
tags_id
self
.
params
[
"tab_id"
]
=
tab_id
return
self
.
api_send
(
self
.
data
[
"community"
])
if
__name__
==
'__main__'
:
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
#社区tab页签到和招募活动列表
print
(
feed_request
()
.
config_list
())
\ No newline at end of file
print
(
feed_request
()
.
config_list
())
#社区tab页签到和招募活动列表
print
(
feed_request
()
.
community
())
\ No newline at end of file
all_backend_api/feed_request.yaml
View file @
832af755
...
...
@@ -18,3 +18,16 @@ config_list:
data
:
json
:
{}
isLogin
:
1
#社区tab页feed流
community
:
method
:
get
url
:
/api/feed/index/community
params
:
version
:
${version}
tabtype
:
choice
tags_id
:
[]
tab_id
:
0
data
:
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
832af755
...
...
@@ -150,5 +150,11 @@ TAG_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data"
CONFIG_LIST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
CONFIG_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"config_list.yaml"
)
#社区tabfeed流
COMMUNITY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
COMMUNITY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"community.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/feed_case/test_community.py
0 → 100644
View file @
832af755
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.feed_request
import
feed_request
class
TestCommunity
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
COMMUNITY
)
community_case
,
community_data
=
get_ids
(
data
,
"community"
)
@pytest.mark.parametrize
(
"param"
,
community_data
,
ids
=
community_case
)
def
test_community
(
self
,
param
):
r
=
feed_request
()
.
community
(
param
[
"version"
],
param
[
"tabtype"
],
param
[
"tags_id"
],
param
[
"tab_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"features"
][
0
]
!=
param
[
"assert"
]
# else:
# assert r["data"]["config_list"][0]["type"] == param["assert1"]
test_backend_data/feed_data/community.yaml
0 → 100644
View file @
832af755
community
:
#社区tab页feed流
-
case
:
"
社区tab页
feed流"
version
:
"
7.43.0"
assert
:
null
tabtype
:
choice
tags_id
:
[]
tab_id
:
0
\ No newline at end of file
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