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
6e7d6c39
Commit
6e7d6c39
authored
3 years ago
by
林颖
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ly_dev' into common_dev
parents
43eb1e73
078e97eb
zzsq_dev
common_dev
crk_dev
cuixin_dev
ly_dev
zhanghui_dev
zwn_dev
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
189 additions
and
0 deletions
+189
-0
visual_request.py
all_backend_api/visual_request.py
+14
-0
visual_request.yaml
all_backend_api/visual_request.yaml
+11
-0
web_request.py
all_doctor_api/web_request.py
+17
-0
web_request.yaml
all_doctor_api/web_request.yaml
+32
-0
path_setting.py
path_setting.py
+11
-0
__init__.py
test_backend_case/visual_case/__init__.py
+0
-0
test_service_list.py
test_backend_case/visual_case/test_service_list.py
+19
-0
__init__.py
test_backend_data/visual_data/__init__.py
+0
-0
service_list.yaml
test_backend_data/visual_data/service_list.yaml
+8
-0
test_doctor_doctorlist.py
test_doctor_case/web_case/test_doctor_doctorlist.py
+19
-0
test_doctor_verificationcode.py
test_doctor_case/web_case/test_doctor_verificationcode.py
+21
-0
doctor_doctorlist.yaml
test_doctor_data/web_data/doctor_doctorlist.yaml
+14
-0
doctor_verificationcode.yaml
test_doctor_data/web_data/doctor_verificationcode.yaml
+23
-0
No files found.
all_backend_api/visual_request.py
0 → 100644
View file @
6e7d6c39
import
path_setting
from
in_common.base_request
import
BaseRequest
class
visual_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
VISUAL_CONFIG
)
# 签到--其他tab 美购feed
def
service_list
(
self
,
unit_id
,
current_city_id
=
'beijing'
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
return
self
.
api_send
(
self
.
data
[
'service_list'
])
\ No newline at end of file
This diff is collapsed.
Click to expand it.
all_backend_api/visual_request.yaml
0 → 100644
View file @
6e7d6c39
#签到--其他tab 美购feed
service_list
:
method
:
GET
url
:
/api/visual/service_list
params
:
#组件id
unit_id
:
${unit_id}
current_city_id
:
${current_city_id}
data
:
{}
json
:
{}
is_Login
:
1
This diff is collapsed.
Click to expand it.
all_doctor_api/web_request.py
View file @
6e7d6c39
...
...
@@ -15,6 +15,23 @@ class web_request(BaseRequest):
def
doctor_submechanisms
(
self
)
:
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_submechanisms"
])
# 医生后台-商户管理-医生管理列表
def
doctor_doctorlist
(
self
,
doctor_type
):
self
.
params
[
"doctor_type"
]
=
doctor_type
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_doctorlist"
])
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
def
doctor_verificationcode
(
self
,
phone
):
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_verificationcode"
])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
def
file_upload
(
self
,
phone
):
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"file_upload"
])
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
...
...
This diff is collapsed.
Click to expand it.
all_doctor_api/web_request.yaml
View file @
6e7d6c39
...
...
@@ -217,3 +217,34 @@ cpc_community_promote_flows:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
#医生后台-商户管理-医生管理列表
doctor_doctorlist
:
method
:
get
url
:
/api/web/doctor/doctorlist
params
:
doctor_type
:
${doctor_type}
data
:
{
}
json
:
{
}
isLogin
:
1
#需要登录
#医生后台-商户管理-医生管理列表--创建医生发送验证码
doctor_verificationcode
:
method
:
post
url
:
/api/web/doctor/verificationcode
params
:
{}
data
:
phone
:
${phone}
json
:
{}
isLogin
:
1
#需要登录
#医生后台-商户管理-医生管理列表--创建医生上传头像图片
file_upload
:
method
:
post
url
:
/api/web/file/upload
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
This diff is collapsed.
Click to expand it.
path_setting.py
View file @
6e7d6c39
...
...
@@ -156,10 +156,21 @@ SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
SIGN_CALENDAR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"sign_calendar.yaml"
)
# 签到--其他 tab feed --也是总的 visual 配置项
VISUAL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_request.yaml"
)
VISUAL_SERVICE_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/visual_data"
,
"service_list.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"
)
# 医生后台--医生后台-商户管理-医生管理列表
DOCTORLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_doctorlist.yaml"
)
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
DOCTOR_VERIIFICATIONCODE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_verificationcode.yaml"
)
#医生后台-我的商品
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
...
...
This diff is collapsed.
Click to expand it.
test_backend_case/visual_case/__init__.py
0 → 100644
View file @
6e7d6c39
This diff is collapsed.
Click to expand it.
test_backend_case/visual_case/test_service_list.py
0 → 100644
View file @
6e7d6c39
import
pytest
import
path_setting
from
all_backend_api.visual_request
import
visual_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
VISUAL_SERVICE_LIST
)
service_list_case
,
service_list_data
=
get_ids
(
data
,
"service_list"
)
#
@pytest.mark.parametrize
(
"param"
,
service_list_data
,
ids
=
service_list_case
)
def
test_service_list
(
self
,
param
):
r
=
visual_request
()
.
service_list
(
param
[
"unit_id"
])
assert
r
[
"error"
]
==
0
list
=
r
.
get
(
"data"
)
.
get
(
"services"
,[])
assert
len
(
list
)
==
param
[
"len"
]
This diff is collapsed.
Click to expand it.
test_backend_data/visual_data/__init__.py
0 → 100644
View file @
6e7d6c39
This diff is collapsed.
Click to expand it.
test_backend_data/visual_data/service_list.yaml
0 → 100644
View file @
6e7d6c39
#签到--其他tab 美购feed
service_list
:
-
case
:
"
签到--其他tab
美购feed
校验返回数据数"
assert
:
0
len
:
10
unit_id
:
17923
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test_doctor_case/web_case/test_doctor_doctorlist.py
0 → 100644
View file @
6e7d6c39
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestDoctorDoctorlist
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTORLIST
)
doctor_doctorlist_case
,
doctor_doctorlist_data
=
get_ids
(
data
,
"doctor_doctorlist"
)
@pytest.mark.parametrize
(
"param"
,
doctor_doctorlist_data
,
ids
=
doctor_doctorlist_case
)
def
test_doctor_doctorlist
(
self
,
param
):
'''医生列表'''
r
=
web_request
()
.
doctor_doctorlist
(
param
[
'doctor_type'
])
assert
r
[
"error"
]
==
0
assert
r
[
"data"
][
'doctors'
]
is
not
None
and
type
(
r
[
"data"
][
'doctors'
])
is
list
This diff is collapsed.
Click to expand it.
test_doctor_case/web_case/test_doctor_verificationcode.py
0 → 100644
View file @
6e7d6c39
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestDoctorVerificationcode
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_VERIIFICATIONCODE
)
doctor_verificationcode_case
,
doctor_verificationcode_data
=
get_ids
(
data
,
"doctor_verificationcode"
)
@pytest.mark.parametrize
(
"param"
,
doctor_verificationcode_data
,
ids
=
doctor_verificationcode_case
)
def
test_doctor_verificationcode
(
self
,
param
):
'''医生列表'''
r
=
web_request
()
.
doctor_verificationcode
(
param
[
'phone'
])
assert
r
[
"error"
]
==
0
assert
r
[
'data'
][
'code'
]
==
param
[
"code"
]
assert
r
[
'data'
][
'message'
]
==
param
[
"message"
]
This diff is collapsed.
Click to expand it.
test_doctor_data/web_data/doctor_doctorlist.yaml
0 → 100644
View file @
6e7d6c39
doctor_doctorlist
:
#医生后台-商户管理-医生管理列表case
-
case
:
"
医生后台-商户管理-医生管理列表--已创建"
assert_size
:
10
assert
:
10
doctor_type
:
0
-
case
:
"
医生后台-商户管理-医生管理列表--审核中"
assert_size
:
10
assert
:
10
doctor_type
:
1
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test_doctor_data/web_data/doctor_verificationcode.yaml
0 → 100644
View file @
6e7d6c39
doctor_verificationcode
:
#医生后台-商户管理-医生管理列表--创建医生--医生发送验证码case
-
case
:
"
医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送不存在的用户的手机号"
assert_size
:
10
assert
:
10
phone
:
12341234124
message
:
'
请先用该号码在更美pc站或者app注册更美用户账号!'
code
:
1
-
case
:
"
医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但是已经是医生账号的手机号"
assert_size
:
10
assert
:
10
phone
:
12345654321
message
:
'
该手机号已经注册为医生或机构,请更换手机号重新注册!'
code
:
1
-
case
:
"
医生后台-商户管理-医生管理列表--创建医生--医生发送验证码--发送存在的用户但不是医生账号的手机号"
assert_size
:
10
assert
:
10
phone
:
12341234121
message
:
'
发送成功!'
code
:
0
This diff is collapsed.
Click to expand it.
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