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
c26aa0ea
Commit
c26aa0ea
authored
Jun 01, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' of
http://git.wanmeizhensuo.com/dengyingying/backend_auto
into common_dev
parents
96e4ee12
e26513b5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
126 additions
and
5 deletions
+126
-5
glmer_request.py
all_doctor_api/glmer_request.py
+34
-0
glmer_request.yaml
all_doctor_api/glmer_request.yaml
+27
-0
web_request.py
all_doctor_api/web_request.py
+2
-0
web_request.yaml
all_doctor_api/web_request.yaml
+1
-0
path_setting.py
path_setting.py
+6
-5
__init__.py
test_doctor_case/glmer_case/__init__.py
+0
-0
test_service_register.py
test_doctor_case/glmer_case/test_service_register.py
+23
-0
__init__.py
test_doctor_data/glmer_data/__init__.py
+0
-0
service_register.yaml
test_doctor_data/glmer_data/service_register.yaml
+33
-0
No files found.
all_doctor_api/glmer_request.py
0 → 100644
View file @
c26aa0ea
import
path_setting
from
in_common.base_request
import
BaseRequest
class
glmer_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
REGISTER_URL
=
self
.
api_load
(
path_setting
.
REGISTER_URL
)
def
service_register
(
self
,
name
,
project_type
,
upgrade
,
short_description
,
doctor_id
,
start_time
,
end_time
,
photo_details
,
image_header
,
video_token
,
service_type
,
is_specialreview
,
reservation
,
have_extra_pay
,
is_draft
,
items
,
csrfmiddlewaretoken
):
self
.
params
[
"name"
]
=
name
self
.
params
[
"project_type"
]
=
project_type
self
.
params
[
"upgrade"
]
=
upgrade
self
.
params
[
"short_description"
]
=
short_description
self
.
params
[
"doctor_id"
]
=
doctor_id
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"end_time"
]
=
end_time
self
.
params
[
"photo_details"
]
=
photo_details
self
.
params
[
"image_header"
]
=
image_header
self
.
params
[
"video_token"
]
=
video_token
self
.
params
[
"service_type"
]
=
service_type
self
.
params
[
"is_specialreview"
]
=
is_specialreview
self
.
params
[
"reservation"
]
=
reservation
self
.
params
[
"have_extra_pay"
]
=
have_extra_pay
self
.
params
[
"is_draft"
]
=
is_draft
self
.
params
[
"items"
]
=
items
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
REGISTER_URL
[
"service_register"
])
if
__name__
==
'__main__'
:
print
(
glmer_request
()
.
service_register
(
"激光溶脂瘦脸"
,
"[236]"
,
"true"
,
"测试"
,
"wangyang"
,
"1624377600"
,
"1627660800"
,
"<p>12</p>"
,
"https://heras.igengmei.com/service/2021/06/01/0b9b110e60"
,
"UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL:nBdvXYz_CR7wNcuroo3TLyvuQiY=:eyJzY29wZSI6InZpZGVvIiwiZGVhZGxpbmUiOjE2MjI1MTg2NTd9"
,
"0"
,
"false"
,
"1"
,
"false"
,
"0"
,
'[{"gengmei_price":100,"original_price":200,"is_online":true}]'
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
all_doctor_api/glmer_request.yaml
0 → 100644
View file @
c26aa0ea
service_register
:
method
:
POST
url
:
/api/glmer/service/register
params
:
{}
data
:
name
:
${name}
project_type
:
${project_type}
upgrade
:
${upgrade}
short_description
:
${short_description}
doctor_id
:
${doctor_id}
start_time
:
${start_time}
end_time
:
${end_time}
photo_details
:
${photo_details}
image_header
:
${image_header}
video_token
:
${video_token}
service_type
:
${service_type}
is_specialreview
:
${is_specialreview}
reservation
:
${reservation}
have_extra_pay
:
${have_extra_pay}
is_draft
:
${is_draft}
items
:
${items}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
all_doctor_api/web_request.py
View file @
c26aa0ea
...
...
@@ -18,6 +18,8 @@ class web_request(BaseRequest):
if
__name__
==
'__main__'
:
print
(
web_request
()
.
account_unreadbadgecount
())
print
(
web_request
()
.
article_videotoken
())
...
...
all_doctor_api/web_request.yaml
View file @
c26aa0ea
...
...
@@ -26,3 +26,4 @@ doctor_submechanisms:
json
:
{}
isLogin
:
1
path_setting.py
View file @
c26aa0ea
...
...
@@ -18,8 +18,8 @@ DIARY_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data
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"
)
#医生后台-我的商品
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
...
...
@@ -28,8 +28,7 @@ SERVICE_URL=os.path.join(BASE_DIR, "backend_auto/all_doctor_api", "web2_request.
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"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
#医生后台-商品审核流程
...
...
@@ -52,12 +51,14 @@ TAG_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "tag_
#医生后台 - 发布商品选择类目doctor
DOCTOR_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_submechanisms.yaml"
)
#医生后台-保存新增商品
REGISTER_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"glmer_request.yaml"
)
REGISTER_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/glmer_data"
,
"service_register.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"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
# 首页灰度v9,精选tab
FEED_INDEXV9_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
...
...
test_doctor_case/glmer_case/__init__.py
0 → 100644
View file @
c26aa0ea
test_doctor_case/glmer_case/test_service_register.py
0 → 100644
View file @
c26aa0ea
import
pytest
import
path_setting
from
all_doctor_api.glmer_request
import
glmer_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceRegister
:
service_register
=
BaseRequest
()
.
api_load
(
path_setting
.
REGISTER_DATA
)
ServiceRegister_case
,
ServiceRegister_data
=
get_ids
(
service_register
,
"service_register"
)
@pytest.mark.parametrize
(
"params"
,
ServiceRegister_data
,
ids
=
ServiceRegister_case
)
def
test_ServiceRegister
(
self
,
params
):
r
=
glmer_request
()
.
service_register
(
params
[
'name'
],
params
[
'project_type'
],
params
[
'upgrade'
],
params
[
'short_description'
],
params
[
'doctor_id'
],
params
[
'start_time'
],
params
[
'end_time'
],
params
[
'photo_details'
],
params
[
'image_header'
],
params
[
'video_token'
],
params
[
'service_type'
],
params
[
'is_specialreview'
],
params
[
'reservation'
],
params
[
'have_extra_pay'
],
params
[
'is_draft'
],
params
[
'items'
],
params
[
'csrfmiddlewaretoken'
])
print
(
"======"
,
r
)
if
r
[
"code"
]
==
0
:
assert
r
[
"code"
]
==
params
[
"assert"
]
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
test_doctor_data/glmer_data/__init__.py
0 → 100644
View file @
c26aa0ea
test_doctor_data/glmer_data/service_register.yaml
0 → 100644
View file @
c26aa0ea
service_register
:
#我的商品菜单下有数据返回1
-
case
:
"
发布(新增)商品-保存商品"
name
:
"
激光溶脂瘦脸"
project_type
:
"
[236]"
upgrade
:
"
true"
short_description
:
"
测试"
doctor_id
:
"
wangyang"
start_time
:
"
1624377600"
end_time
:
"
1627660800"
photo_details
:
"
<p>12</p>"
image_header
:
"
https://heras.igengmei.com/service/2021/06/01/0b9b110e60"
video_token
:
"
UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL:nBdvXYz_CR7wNcuroo3TLyvuQiY=:eyJzY29wZSI6InZpZGVvIiwiZGVhZGxpbmUiOjE2MjI1MTg2NTd9"
service_type
:
"
0"
is_specialreview
:
"
false"
reservation
:
"
1"
have_extra_pay
:
"
false"
is_draft
:
"
0"
items
:
'
[{"gengmei_price":100,"original_price":200,"is_online":true}]'
csrfmiddlewaretoken
:
"
PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
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