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
9ac92c0e
Commit
9ac92c0e
authored
Jun 01, 2021
by
陈雪
Browse files
Options
Browse Files
Download
Plain Diff
商品下线
parents
9f702620
18c6d3fc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
7 deletions
+52
-7
web_request.py
all_doctor_api/web_request.py
+9
-4
web_request.yaml
all_doctor_api/web_request.yaml
+10
-0
host.yaml
host.yaml
+3
-2
path_setting.py
path_setting.py
+3
-0
test_doctor_submechanisms.py
test_doctor_case/web_case/test_doctor_submechanisms.py
+0
-1
test_service_offline.py
test_doctor_case/web_case/test_service_offline.py
+20
-0
service_offline.yaml
test_doctor_data/web_data/service_offline.yaml
+7
-0
No files found.
all_doctor_api/web_request.py
View file @
9ac92c0e
...
@@ -4,17 +4,21 @@ from in_common.base_request import BaseRequest
...
@@ -4,17 +4,21 @@ from in_common.base_request import BaseRequest
class
web_request
(
BaseRequest
):
class
web_request
(
BaseRequest
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ACCOUNT_URL
)
self
.
ACCOUNT_URL
=
self
.
api_load
(
path_setting
.
ACCOUNT_URL
)
def
account_unreadbadgecount
(
self
)
:
def
account_unreadbadgecount
(
self
)
:
return
self
.
api_send
(
self
.
data
[
"account_unreadbadgecount"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"account_unreadbadgecount"
])
def
article_videotoken
(
self
)
:
def
article_videotoken
(
self
)
:
return
self
.
api_send
(
self
.
data
[
"article_videotoken"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"article_videotoken"
])
def
doctor_submechanisms
(
self
)
:
def
doctor_submechanisms
(
self
)
:
return
self
.
api_send
(
self
.
data
[
"doctor_submechanisms"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_submechanisms"
])
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_offline"
])
...
@@ -24,3 +28,4 @@ if __name__ == '__main__':
...
@@ -24,3 +28,4 @@ if __name__ == '__main__':
print
(
web_request
()
.
account_unreadbadgecount
())
print
(
web_request
()
.
account_unreadbadgecount
())
print
(
web_request
()
.
article_videotoken
())
print
(
web_request
()
.
article_videotoken
())
print
(
web_request
()
.
doctor_submechanisms
())
print
(
web_request
()
.
doctor_submechanisms
())
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
all_doctor_api/web_request.yaml
View file @
9ac92c0e
...
@@ -27,3 +27,12 @@ doctor_submechanisms:
...
@@ -27,3 +27,12 @@ doctor_submechanisms:
isLogin
:
1
isLogin
:
1
service_offline
:
method
:
post
url
:
/api/web/service/offline
param
:
{}
data
:
id
:
${id}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
\ No newline at end of file
host.yaml
View file @
9ac92c0e
develop_host
:
develop_host
:
backend
:
http://backend.paas-develop.env
# backend: http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
doctor
:
http://doctor.paas-develop.env
path_setting.py
View file @
9ac92c0e
...
@@ -58,6 +58,9 @@ REGISTER_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/glmer_data",
...
@@ -58,6 +58,9 @@ REGISTER_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/glmer_data",
#医生后台-编辑商品
#医生后台-编辑商品
DETAIL_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/glmer_data"
,
"service_detail.yaml"
)
DETAIL_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/glmer_data"
,
"service_detail.yaml"
)
#医生后台-我的商品-下线商品
OFFLINE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"service_offline.yaml"
)
#搜索首页-热门搜索
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
...
...
test_doctor_case/web_case/test_doctor_submechanisms.py
View file @
9ac92c0e
...
@@ -15,7 +15,6 @@ class TestDoctorSubmechanisms:
...
@@ -15,7 +15,6 @@ class TestDoctorSubmechanisms:
def
test_DoctorSubmechanisms_data
(
self
,
param
):
def
test_DoctorSubmechanisms_data
(
self
,
param
):
r
=
web_request
()
.
doctor_submechanisms
()
r
=
web_request
()
.
doctor_submechanisms
()
print
(
"======="
,
r
)
if
r
[
"error"
]
==
0
:
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"error"
]
==
param
[
"assert"
]
# elif r["error"] == 1:
# elif r["error"] == 1:
...
...
test_doctor_case/web_case/test_service_offline.py
0 → 100644
View file @
9ac92c0e
import
pytest
import
path_setting
from
all_doctor_api.web_request
import
web_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceOffline
:
service_offline
=
BaseRequest
()
.
api_load
(
path_setting
.
OFFLINE_DATA
)
ServiceOffline_case
,
ServiceOffline_data
=
get_ids
(
service_offline
,
"service_offline"
)
@pytest.mark.parametrize
(
"params"
,
ServiceOffline_data
,
ids
=
ServiceOffline_case
)
def
test_ServiceOffline_data
(
self
,
params
):
r
=
web_request
()
.
service_offline
(
params
[
'id'
],
params
[
'csrfmiddlewaretoken'
])
print
(
"======="
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
params
[
"assert"
]
test_doctor_data/web_data/service_offline.yaml
0 → 100644
View file @
9ac92c0e
service_offline
:
-
case
:
"
我的商品-下线商品"
id
:
209992
csrfmiddlewaretoken
:
PC8uTySuxipukIMuqNV1OPB376C2ZZ3g
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