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
7b6616ec
Commit
7b6616ec
authored
Jun 17, 2021
by
875344244@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
次卡商详和适用机构
parent
92007f29
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
125 additions
and
4 deletions
+125
-4
.DS_Store
.DS_Store
+0
-0
feed_request.py
all_backend_api/feed_request.py
+25
-4
feed_request.yaml
all_backend_api/feed_request.yaml
+26
-0
path_setting.py
path_setting.py
+8
-0
test_free_recruit_banner.py
test_backend_case/feed_case/test_free_recruit_banner.py
+21
-0
test_free_recruit_list.py
test_backend_case/feed_case/test_free_recruit_list.py
+21
-0
free_recruit_banner.yaml
test_backend_data/feed_data/free_recruit_banner.yaml
+10
-0
free_recruit_list.yaml
test_backend_data/feed_data/free_recruit_list.yaml
+14
-0
No files found.
.DS_Store
View file @
7b6616ec
No preview for this file type
all_backend_api/feed_request.py
View file @
7b6616ec
...
...
@@ -7,6 +7,7 @@ class feed_request(BaseRequest):
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
)
self
.
data
=
self
.
api_load
(
path_setting
.
FREE_RECRUIT_BANNER_CONFIG
)
def
index_v9
(
self
,
tabtype
,
version
,
current_city_id
):
...
...
@@ -31,12 +32,32 @@ class feed_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"community"
])
# 免费招募列表的背景图片
def
free_recruit_banner
(
self
,
version
,
json
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"json"
]
=
json
return
self
.
api_send
(
self
.
data
[
"free_recruit_banner"
])
# 免费招募列表
def
free_recruit_list
(
self
,
version
,
json
,
tab_type
,
page
,
size
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"json"
]
=
json
self
.
params
[
"tab_type"
]
=
tab_type
self
.
params
[
"page"
]
=
page
self
.
params
[
"size"
]
=
size
return
self
.
api_send
(
self
.
data
[
"free_recruit_list"
])
if
__name__
==
'__main__'
:
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
#社区tab页签到和招募活动列表
print
(
feed_request
()
.
config_list
())
print
(
feed_request
()
.
config_list
(
"7.44.0"
))
#社区tab页签到和招募活动列表
print
(
feed_request
()
.
community
())
\ No newline at end of file
#免费招募列表背景图片
print
(
feed_request
()
.
free_recruit_banner
(
"7.44.1"
,
" "
))
# 免费招募列表
print
(
feed_request
()
.
free_recruit_list
(
"7.44.1"
,
" "
,
"1"
,
"1"
,
"10"
))
\ No newline at end of file
all_backend_api/feed_request.yaml
View file @
7b6616ec
...
...
@@ -30,4 +30,29 @@ community:
tab_id
:
0
data
:
json
:
{}
isLogin
:
1
#招募活动列表背景图片
free_recruit_banner
:
method
:
get
url
:
/api/feed/free_recruit/free_recruit_banner
params
:
version
:
${version}
json
:
${json}
data
:
json
:
{
}
isLogin
:
1
#招募活动列表
free_recruit_list
:
method
:
get
url
:
/api/feed/free_recruit/list
params
:
version
:
${version}
json
:
${json}
tab_type
:
${tab_type}
page
:
${page}
size
:
${size}
data
:
json
:
{
}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
7b6616ec
...
...
@@ -228,5 +228,13 @@ BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janu
SERVICE_HOSPITAL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
SERVICE_HOSPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"service_hospital.yaml"
)
#免费招募背景图片
FREE_RECRUIT_BANNER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FREE_RECRUIT_BANNER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"free_recruit_banner.yaml"
)
#免费招募活动列表
FREE_RECRUIT_LIST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FREE_RECRUIT_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"free_recruit_list.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/feed_case/test_free_recruit_banner.py
0 → 100644
View file @
7b6616ec
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
TestFreeRecruitBanner
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FREE_RECRUIT_BANNER
)
free_recruit_banner_case
,
free_recruit_banner_data
=
get_ids
(
data
,
"free_recruit_banner"
)
@pytest.mark.parametrize
(
"param"
,
free_recruit_banner_data
,
ids
=
free_recruit_banner_case
)
def
test_free_recruit_case
(
self
,
param
):
r
=
feed_request
()
.
free_recruit_banner
(
param
[
"version"
],
param
[
"json"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"banner"
]
!=
param
[
"assert"
]
test_backend_case/feed_case/test_free_recruit_list.py
0 → 100644
View file @
7b6616ec
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
TestFreeRecruitList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FREE_RECRUIT_LIST
)
free_recruit_list_case
,
free_recruit_list_data
=
get_ids
(
data
,
"free_recruit_list"
)
@pytest.mark.parametrize
(
"param"
,
free_recruit_list_data
,
ids
=
free_recruit_list_case
)
def
test_free_recruit_list
(
self
,
param
):
r
=
feed_request
()
.
free_recruit_list
(
param
[
"version"
],
param
[
"json"
],
param
[
"tab_type"
],
param
[
"page"
],
param
[
"size"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"free_recruits"
]
!=
param
[
"assert"
]
test_backend_data/feed_data/free_recruit_banner.yaml
0 → 100644
View file @
7b6616ec
free_recruit_banner
:
#社区免费招募活动列表背景图片
-
case
:
"
免费招募活动列表背景图片"
version
:
"
7.44.0"
assert
:
null
json
:
"
"
test_backend_data/feed_data/free_recruit_list.yaml
0 → 100644
View file @
7b6616ec
free_recruit_list
:
#社区招募活动列表
-
case
:
"
免费招募活动列表"
version
:
"
7.44.0"
assert
:
null
json
:
"
"
tab_type
:
1
page
:
1
size
:
10
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