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
f13e6f0d
Commit
f13e6f0d
authored
May 20, 2021
by
冯艮霞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社区签到和免费招募
parent
bde756a2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
0 deletions
+56
-0
feed_request.py
all_backend_api/feed_request.py
+11
-0
feed_request.yaml
all_backend_api/feed_request.yaml
+10
-0
path_setting.py
path_setting.py
+4
-0
test_config_list.py
test_backend_case/feed_case/test_config_list.py
+23
-0
config_list.yaml
test_backend_data/feed_data/config_list.yaml
+8
-0
No files found.
all_backend_api/feed_request.py
View file @
f13e6f0d
...
...
@@ -5,6 +5,7 @@ from in_common.base_request import BaseRequest
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
)
def
index_v9
(
self
,
tabtype
,
version
,
current_city_id
):
self
.
params
[
"tabtype"
]
=
tabtype
...
...
@@ -13,6 +14,15 @@ class feed_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"index_v9"
])
#社区tab页签到和招募活动列表
def
config_list
(
self
,
version
):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"config_list"
])
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
all_backend_api/feed_request.yaml
View file @
f13e6f0d
...
...
@@ -8,3 +8,13 @@ index_v9:
data
:
json
:
{}
isLogin
:
1
#社区tab签到和招募活动列表
config_list
:
method
:
get
url
:
/api/feed/community_activity/config_list
params
:
version
:
${version}
data
:
json
:
{}
isLogin
:
1
path_setting.py
View file @
f13e6f0d
...
...
@@ -142,5 +142,9 @@ SERVICES_SHARE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/ser
TAG_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
TAG_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"tag_service.yaml"
)
#社区tab签到和招募活动
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"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/feed_case/test_config_list.py
0 → 100644
View file @
f13e6f0d
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
TestConfigList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONFIG_LIST
)
configlist_case
,
configlist_data
=
get_ids
(
data
,
"config_list"
)
@pytest.mark.parametrize
(
"param"
,
configlist_data
,
ids
=
configlist_case
)
def
test_config_list
(
self
,
param
):
r
=
feed_request
()
.
config_list
(
param
[
"version"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"config_list"
][
0
][
"type"
]
!=
param
[
"assert"
]
# else:
# assert r["data"]["config_list"][0]["type"] == param["assert1"]
test_backend_data/feed_data/config_list.yaml
0 → 100644
View file @
f13e6f0d
config_list
:
#社区tab获取签到和招募case
-
case
:
"
社区tab签到和招募,有数据返回"
version
:
"
7.43.0"
assert
:
null
assert1
:
1
\ 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