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
398ec3ea
Commit
398ec3ea
authored
Aug 23, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生后台--修改密码相关
parent
6e7d6c39
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
243 additions
and
3 deletions
+243
-3
web_request.py
all_doctor_api/web_request.py
+29
-1
web_request.yaml
all_doctor_api/web_request.yaml
+47
-2
path_setting.py
path_setting.py
+11
-0
test_account_code_online.py
test_doctor_case/web_case/test_account_code_online.py
+17
-0
test_account_login.py
test_doctor_case/web_case/test_account_login.py
+17
-0
test_account_password.py
test_doctor_case/web_case/test_account_password.py
+18
-0
test_doctor_register.py
test_doctor_case/web_case/test_doctor_register.py
+27
-0
account_code_online.yaml
test_doctor_data/web_data/account_code_online.yaml
+8
-0
account_login.yaml
test_doctor_data/web_data/account_login.yaml
+23
-0
account_password.yaml
test_doctor_data/web_data/account_password.yaml
+40
-0
doctor_register.yaml
test_doctor_data/web_data/doctor_register.yaml
+6
-0
No files found.
all_doctor_api/web_request.py
View file @
398ec3ea
...
@@ -25,11 +25,39 @@ class web_request(BaseRequest):
...
@@ -25,11 +25,39 @@ class web_request(BaseRequest):
self
.
params
[
"phone"
]
=
phone
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_verificationcode"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_verificationcode"
])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
--暂时还没写case待定
def
file_upload
(
self
,
phone
):
def
file_upload
(
self
,
phone
):
self
.
params
[
"phone"
]
=
phone
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"file_upload"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"file_upload"
])
# 医生后台-商户管理-医生管理列表--查看审核中的医生
def
doctor_register
(
self
,
doctorregister_id
):
self
.
params
[
"doctorregister_id"
]
=
doctorregister_id
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"doctor_register"
])
# 医生后台-密码登录
def
account_login
(
self
,
name
,
password
,
method
=
'password'
):
self
.
params
[
"name"
]
=
name
self
.
params
[
"password"
]
=
password
self
.
params
[
"method"
]
=
method
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"account_login"
])
# 医生后台-修改密码发送验证码
def
account_code_online
(
self
,
csrfmiddlewaretoken
):
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"account_code_online"
])
# 医生后台-修改密码
def
account_password
(
self
,
new_password
,
code
=
''
):
self
.
params
[
"new_password"
]
=
new_password
# code = self.xxx() # 待会补上方法
self
.
params
[
"code"
]
=
code
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"account_password"
])
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
...
...
all_doctor_api/web_request.yaml
View file @
398ec3ea
...
@@ -247,4 +247,50 @@ file_upload:
...
@@ -247,4 +247,50 @@ file_upload:
params
:
{}
params
:
{}
data
:
{}
data
:
{}
json
:
{}
json
:
{}
isLogin
:
1
#需要登录
isLogin
:
1
#需要登录
\ No newline at end of file
#医生后台-商户管理-医生管理列表--查看审核中的医生
doctor_register
:
method
:
get
url
:
/api/web/doctor/register
params
:
doctorregister_id
:
${doctorregister_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
#医生后台-账号密码登录
account_login
:
method
:
post
url
:
/api/web/account/login
params
:
{}
data
:
name
:
${name}
password
:
${password}
method
:
${method}
json
:
{}
#医生后台-修改密码发送验证码
account_code_online
:
method
:
post
url
:
/api/web/account/code/online
params
:
{}
data
:
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
#医生后台-修改密码
account_password
:
method
:
post
url
:
/api/web/account/password
params
:
{}
data
:
new_password
:
${new_password}
code
:
${code}
json
:
{}
isLogin
:
1
path_setting.py
View file @
398ec3ea
...
@@ -170,6 +170,17 @@ KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data",
...
@@ -170,6 +170,17 @@ KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data",
DOCTORLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_doctorlist.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"
)
DOCTOR_VERIIFICATIONCODE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_verificationcode.yaml"
)
# 医生后台-商户管理-医生管理列表--审核中的医生查看
DOCTOR_REGISTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_register.yaml"
)
# 医生后台-账号密码登录
DOCTOR_LOGIN
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"account_login.yaml"
)
# 医生后台-修改密码--发送验证码
DOCTOR_CODE_ONLINE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"account_code_online.yaml"
)
# 医生后台-修改密码
DOCTOR_PASSWORD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"account_password.yaml"
)
#医生后台-我的商品
#医生后台-我的商品
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
...
...
test_doctor_case/web_case/test_account_code_online.py
0 → 100644
View file @
398ec3ea
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
TestAccountCodeOnline
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_CODE_ONLINE
)
account_code_online_case
,
account_code_online_data
=
get_ids
(
data
,
"account_code_online"
)
@pytest.mark.parametrize
(
"param"
,
account_code_online_data
,
ids
=
account_code_online_case
)
def
test_account_code_online
(
self
,
param
):
r
=
web_request
()
.
account_code_online
(
param
[
"csrfmiddlewaretoken"
])
assert
r
[
"error"
]
==
param
[
"error"
]
assert
r
[
"message"
]
==
param
[
"message"
]
test_doctor_case/web_case/test_account_login.py
0 → 100644
View file @
398ec3ea
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
TestAccountLogin
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_LOGIN
)
account_login_case
,
account_login_data
=
get_ids
(
data
,
"account_login"
)
@pytest.mark.parametrize
(
"param"
,
account_login_data
,
ids
=
account_login_case
)
def
test_account_login
(
self
,
param
):
r
=
web_request
()
.
account_login
(
param
[
"name"
],
param
[
"password"
])
assert
r
[
"error"
]
==
param
[
"error"
]
assert
r
[
"message"
]
==
param
[
"message"
]
test_doctor_case/web_case/test_account_password.py
0 → 100644
View file @
398ec3ea
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
TestAccountPassword
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_PASSWORD
)
account_password_case
,
account_password_data
=
get_ids
(
data
,
"account_password"
)
@pytest.mark.parametrize
(
"param"
,
account_password_data
,
ids
=
account_password_case
)
def
test_account_password
(
self
,
param
):
r
=
web_request
()
.
account_password
(
param
[
"new_password"
],
param
[
"code"
])
assert
r
[
"error"
]
==
param
[
"error"
]
assert
r
[
"message"
]
==
param
[
"message"
]
test_doctor_case/web_case/test_doctor_register.py
0 → 100644
View file @
398ec3ea
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
TestDoctorRegister
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_REGISTER
)
doctor_register_case
,
doctor_register_data
=
get_ids
(
data
,
"doctor_register"
)
@pytest.mark.parametrize
(
"param"
,
doctor_register_data
,
ids
=
doctor_register_case
)
def
test_doctor_register
(
self
,
param
):
r
=
web_request
()
.
doctor_register
(
param
[
"doctorregister_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
'register_phone'
]
is
not
None
and
r
[
"data"
][
'register_phone'
]
is
not
""
# 校验注册手机号不为空
assert
r
[
"data"
][
'department'
]
is
not
None
and
r
[
"data"
][
'department'
]
is
not
""
# 校验所在科室不为空
assert
r
[
"data"
][
'good_at'
]
is
not
None
and
r
[
"data"
][
'good_at'
]
is
not
""
# 校验项目不为空
assert
r
[
"data"
][
'name'
]
is
not
None
and
r
[
"data"
][
'name'
]
is
not
""
# 校验名字不为空
assert
r
[
"data"
][
'professional_certificate_num'
]
is
not
None
and
r
[
"data"
][
'professional_certificate_num'
]
is
not
""
# 校验证书不为空
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
test_doctor_data/web_data/account_code_online.yaml
0 → 100644
View file @
398ec3ea
account_code_online
:
-
case
:
"
医生后台-修改密码发送验证码
"
error
:
0
csrfmiddlewaretoken
:
'
ICODxWkFPFGlGAX7cwzeXeszBnHzADuK'
message
:
'
验证码已发送至您的手机'
#13221031104
test_doctor_data/web_data/account_login.yaml
0 → 100644
View file @
398ec3ea
account_login
:
-
case
:
"
医生后台-账号密码登录--密码错误导致的登录失败
"
error
:
70002
name
:
12345654321
password
:
123451
message
:
'
登陆失败'
-
case
:
"
医生后台-账号密码登录--账号不存在导致的登录失败
"
error
:
30003
name
:
123456543211
password
:
123451
message
:
'
医生未申请审核加入'
-
case
:
"
医生后台-账号密码登录--登录成功
"
error
:
0
name
:
12345678912
password
:
123456
message
:
"
"
test_doctor_data/web_data/account_password.yaml
0 → 100644
View file @
398ec3ea
account_password
:
# 判断条件是先看密码在看验证码,所以先判断密码,验证码能判断不符合的
-
case
:
"
医生后台-修改密码--密码格式不符合--全数字
"
error
:
22007
new_password
:
123456
code
:
123451
message
:
'
新密码不符合要求,请重新输入'
-
case
:
"
医生后台-修改密码--密码格式不符合--全字母
"
error
:
22007
new_password
:
aaaaaaaa
code
:
123451
message
:
'
新密码不符合要求,请重新输入'
-
case
:
"
医生后台-修改密码--密码格式不符合--混合但少于6位
"
error
:
22007
new_password
:
1234w
code
:
123451
message
:
'
新密码不符合要求,请重新输入'
-
case
:
"
医生后台-修改密码--密码格式不符合--混合但是多于16位
"
error
:
22007
new_password
:
1234567890123456a
code
:
123451
message
:
'
新密码不符合要求,请重新输入'
-
case
:
"
医生后台-修改密码--密码格式不符合--验证码不符合
"
error
:
22001
new_password
:
'
12345a'
code
:
123451
message
:
'
错误的验证码'
test_doctor_data/web_data/doctor_register.yaml
0 → 100644
View file @
398ec3ea
doctor_register
:
-
case
:
"
医生后台-商户管理-医生管理列表--查看审核中的医生
"
assert
:
0
doctorregister_id
:
24086
\ 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