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
856a3c41
Commit
856a3c41
authored
May 18, 2021
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人中心增加断言
parent
7c17ab53
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
4 deletions
+67
-4
service_request.py
all_backend_api/service_request.py
+1
-1
user_request.py
all_backend_api/user_request.py
+17
-0
user_request.yaml
all_backend_api/user_request.yaml
+11
-0
path_setting.py
path_setting.py
+2
-0
test_home_v5.py
test_backend_case/service_case/test_home_v5.py
+2
-2
__init__.py
test_backend_case/user_case/__init__.py
+0
-0
test_personal_center.py
test_backend_case/user_case/test_personal_center.py
+20
-0
home_v5.yaml
test_backend_data/service_data/home_v5.yaml
+1
-1
__init__.py
test_backend_data/user_data/__init__.py
+0
-0
personal_center.yaml
test_backend_data/user_data/personal_center.yaml
+13
-0
No files found.
all_backend_api/service_request.py
View file @
856a3c41
...
...
@@ -5,7 +5,7 @@ from in_common.base_request import BaseRequest
class
service_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HOME_V5_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
HOME_V5_CONFIG
)
#/all_backend_api/service_request.yaml
def
home_v5
(
self
):
...
...
all_backend_api/user_request.py
0 → 100644
View file @
856a3c41
import
path_setting
from
in_common.base_request
import
BaseRequest
class
user_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
PERSONAL_CENTER_CONFIG
)
def
personal_center
(
self
):
print
(
"fgx"
)
return
self
.
api_send
(
self
.
data
[
"personal_center"
])
if
__name__
==
'__main__'
:
print
(
user_request
()
.
personal_center
())
print
(
"fgx"
)
all_backend_api/user_request.yaml
0 → 100644
View file @
856a3c41
personal_center
:
method
:
GET
url
:
/api/user/personal_center
params
:
choose_id
:
0
community_id
:
0
version
:
7.42.0
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
856a3c41
...
...
@@ -36,6 +36,8 @@ HOSPITAL_DOCTOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospita
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"
)
PERSONAL_CENTER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
PERSONAL_CENTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"personal_center.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOSTYAML_CONFIG
)
test_backend_case/service_case/test_home_v5.py
View file @
856a3c41
...
...
@@ -9,13 +9,13 @@ 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
)
print
(
"home_v6"
)
#if r["error"] == 0:
assert
r
[
"error"
]
==
param
[
"assert"
]
...
...
test_backend_case/user_case/__init__.py
0 → 100644
View file @
856a3c41
test_backend_case/user_case/test_personal_center.py
0 → 100644
View file @
856a3c41
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestPersonalCenter
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
PERSONAL_CENTER
)
personalcenter_case
,
personalcenter_data
=
get_ids
(
data
,
"personal_center"
)
@pytest.mark.parametrize
(
"param"
,
personalcenter_data
,
ids
=
personalcenter_case
)
def
test_personal_center
(
self
,
param
):
r
=
user_request
()
.
personal_center
()
print
(
'feng='
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
"user"
][
"portrait"
]
!=
param
[
"portrait"
]
test_backend_data/service_data/home_v5.yaml
View file @
856a3c41
home_v5
:
#获取商城首页
-
case
:
"
获取商城首页--case首页"
case
:
"
获取商城首页
index
--case首页"
assert
:
0
...
...
test_backend_data/user_data/__init__.py
0 → 100644
View file @
856a3c41
test_backend_data/user_data/personal_center.yaml
0 → 100644
View file @
856a3c41
personal_center
:
#个人中心
-
case
:
"
获取个人中心--case首页"
assert
:
0
portrait
:
null
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