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
4c76a2d6
Commit
4c76a2d6
authored
Aug 19, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口签到-其他tab feed
parent
ad7def80
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
0 deletions
+57
-0
visual_request.py
all_backend_api/visual_request.py
+14
-0
visual_request.yaml
all_backend_api/visual_request.yaml
+11
-0
path_setting.py
path_setting.py
+5
-0
__init__.py
test_backend_case/visual_case/__init__.py
+0
-0
test_service_list.py
test_backend_case/visual_case/test_service_list.py
+19
-0
__init__.py
test_backend_data/visual_data/__init__.py
+0
-0
service_list.yaml
test_backend_data/visual_data/service_list.yaml
+8
-0
No files found.
all_backend_api/visual_request.py
0 → 100644
View file @
4c76a2d6
import
path_setting
from
in_common.base_request
import
BaseRequest
class
visual_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
VISUAL_CONFIG
)
# 签到--其他tab 美购feed
def
service_list
(
self
,
unit_id
,
current_city_id
=
'beijing'
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
return
self
.
api_send
(
self
.
data
[
'service_list'
])
\ No newline at end of file
all_backend_api/visual_request.yaml
0 → 100644
View file @
4c76a2d6
#签到--其他tab 美购feed
service_list
:
method
:
GET
url
:
/api/visual/service_list
params
:
#组件id
unit_id
:
${unit_id}
current_city_id
:
${current_city_id}
data
:
{}
json
:
{}
is_Login
:
1
path_setting.py
View file @
4c76a2d6
...
...
@@ -155,6 +155,11 @@ SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
# 签到日历
SIGN_CALENDAR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"sign_calendar.yaml"
)
# 签到--其他 tab feed --也是总的 visual 配置项
VISUAL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_request.yaml"
)
VISUAL_SERVICE_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/visual_data"
,
"service_list.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
test_backend_case/visual_case/__init__.py
0 → 100644
View file @
4c76a2d6
test_backend_case/visual_case/test_service_list.py
0 → 100644
View file @
4c76a2d6
import
pytest
import
path_setting
from
all_backend_api.visual_request
import
visual_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
VISUAL_SERVICE_LIST
)
service_list_case
,
service_list_data
=
get_ids
(
data
,
"service_list"
)
#
@pytest.mark.parametrize
(
"param"
,
service_list_data
,
ids
=
service_list_case
)
def
test_service_list
(
self
,
param
):
r
=
visual_request
()
.
service_list
(
param
[
"unit_id"
])
assert
r
[
"error"
]
==
0
list
=
r
.
get
(
"data"
)
.
get
(
"services"
,[])
assert
len
(
list
)
==
param
[
"len"
]
test_backend_data/visual_data/__init__.py
0 → 100644
View file @
4c76a2d6
test_backend_data/visual_data/service_list.yaml
0 → 100644
View file @
4c76a2d6
#签到--其他tab 美购feed
service_list
:
-
case
:
"
签到--其他tab
美购feed
校验返回数据数"
assert
:
0
len
:
10
unit_id
:
17923
\ 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