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
6b50842b
Commit
6b50842b
authored
Apr 16, 2021
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商城首页接口
parent
42c6066e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
0 deletions
+72
-0
service_request.py
all_backend_api/service_request.py
+17
-0
service_request.yaml
all_backend_api/service_request.yaml
+8
-0
path_setting.py
path_setting.py
+4
-0
__init__.py
test_backend_case/service_case/__init__.py
+0
-0
test_home_v5.py
test_backend_case/service_case/test_home_v5.py
+32
-0
__init__.py
test_backend_data/service_data/__init__.py
+0
-0
home_v5.yaml
test_backend_data/service_data/home_v5.yaml
+11
-0
No files found.
all_backend_api/service_request.py
View file @
6b50842b
import
path_setting
from
in_common.base_request
import
BaseRequest
class
service_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HOME_V5_CONFIG
)
def
home_v5
(
self
):
return
self
.
api_send
(
self
.
data
[
"home_v5"
])
if
__name__
==
'__main__'
:
print
(
service_request
()
.
home_v5
())
\ No newline at end of file
all_backend_api/service_request.yaml
View file @
6b50842b
home_v5
:
method
:
get
url
:
/api/service/home/v5
params
:
{}
data
:
{}
json
:
{}
path_setting.py
View file @
6b50842b
...
@@ -7,5 +7,9 @@ HOSTYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto", "host.yaml")
...
@@ -7,5 +7,9 @@ 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"
)
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"
)
LOGIN_VFC
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_vfc.yaml"
)
HOME_V5_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"service_request.yaml"
)
HOME_V5
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_v5.yaml"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOSTYAML_CONFIG
)
print
(
"=========="
,
HOSTYAML_CONFIG
)
all_backend_api/user_request
.py
→
test_backend_case/service_case/__init__
.py
View file @
6b50842b
File moved
test_backend_case/service_case/test_home_v5.py
0 → 100644
View file @
6b50842b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.service_request
import
service_request
class
TestHomeV5
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
HOME_V5
)
homev5_case
,
homev5_data
=
get_ids
(
data
,
"home_v5"
)
print
(
data
)
@pytest.mark.parametrize
(
"param"
,
homev5_data
,
ids
=
homev5_case
)
def
test_home_v5
(
self
,
param
):
#print(param["home_v5"])
r
=
service_request
()
.
home_v5
()
print
(
r
)
#if r["error"] == 0:
assert
r
[
"error"
]
==
param
[
"assert"
]
all_backend_api/user_request.yaml
→
test_backend_data/service_data/__init__.py
View file @
6b50842b
File moved
test_backend_data/service_data/home_v5.yaml
0 → 100644
View file @
6b50842b
home_v5
:
#获取商城首页
-
case
:
"
获取商城首页--case首页"
assert
:
0
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