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
022af858
Commit
022af858
authored
Apr 15, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
42c6066e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
2 deletions
+60
-2
feed_request.py
all_backend_api/feed_request.py
+19
-0
feed_request.yaml
all_backend_api/feed_request.yaml
+9
-0
path_setting.py
path_setting.py
+3
-0
test_login_vfc.py
test_backend_case/account_case/test_login_vfc.py
+0
-2
__init__.py
test_backend_case/feed_case/__init__.py
+0
-0
test_index_v9.py
test_backend_case/feed_case/test_index_v9.py
+20
-0
__init__.py
test_backend_data/feed_data/__init__.py
+0
-0
index_v9.yaml
test_backend_data/feed_data/index_v9.yaml
+9
-0
No files found.
all_backend_api/feed_request.py
0 → 100644
View file @
022af858
import
path_setting
from
in_common.base_request
import
BaseRequest
class
feed_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
FEED_INDEXV9_CONFIG
)
def
index_v9
(
self
,
tabtype
,
version
,
current_city_id
):
self
.
params
[
"tabtype"
]
=
tabtype
self
.
params
[
"version"
]
=
version
self
.
params
[
"current_city_id"
]
=
current_city_id
return
self
.
api_send
(
self
.
data
[
"index_v9"
])
if
__name__
==
'__main__'
:
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
\ No newline at end of file
all_backend_api/feed_request.yaml
0 → 100644
View file @
022af858
index_v9
:
method
:
get
url
:
/api/feed/index/v9
params
:
tabtype
:
${tabtype}
version
:
${version}
current_city_id
:
${current_city_id}
data
:
json
:
{}
path_setting.py
View file @
022af858
...
...
@@ -7,5 +7,8 @@ HOSTYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto", "host.yaml")
APYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"account_request.yaml"
)
LOGIN_VFC
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_vfc.yaml"
)
FEED_INDEXV9_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FEED_INDEXV9_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"index_v9.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOSTYAML_CONFIG
)
test_backend_case/account_case/test_login_vfc.py
View file @
022af858
...
...
@@ -20,5 +20,3 @@ class TestLoginVfc:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_case/feed_case/__init__.py
0 → 100644
View file @
022af858
test_backend_case/feed_case/test_index_v9.py
0 → 100644
View file @
022af858
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
TestIndexV9
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FEED_INDEXV9_DATA
)
indexv9_case
,
indexv9_data
=
get_ids
(
data
,
"index_v9"
)
@pytest.mark.parametrize
(
"param"
,
indexv9_data
,
ids
=
indexv9_case
)
def
test_index_v9
(
self
,
param
):
r
=
feed_request
()
.
index_v9
(
param
[
"tabtype"
],
param
[
"version"
],
param
[
"current_city_id"
])
if
r
[
"error"
]
==
0
:
features
=
r
.
get
(
"data"
)
.
get
(
"features"
,[])
assert
len
(
features
)
>
param
[
"assert"
]
test_backend_data/feed_data/__init__.py
0 → 100644
View file @
022af858
test_backend_data/feed_data/index_v9.yaml
0 → 100644
View file @
022af858
index_v9
:
#成功登录case
-
case
:
"
请求成功,有数据返回"
current_city_id
:
"
beijing"
tabtype
:
"
choice"
version
:
"
7.42.2"
assert
:
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