Commit 3322c036 authored by edz's avatar edz

解决冲突

parents 84b21fc9 1a829189
......@@ -25,11 +25,49 @@ class web_request(BaseRequest):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["doctor_verificationcode"])
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片
# 医生后台-商户管理-医生管理列表--创建医生上传头像图片--暂时还没写case待定
def file_upload(self,phone):
self.params["phone"] = phone
return self.api_send(self.ACCOUNT_URL["file_upload"])
# 医生后台-商户管理-医生管理列表--创建医生--提交创建单
def doctor_register_post(self,profession_licences,b_licences,p_licences,personal_pictures,register_phone,verification_code):
self.params["profession_licences"] = profession_licences
self.params["b_licences"] = b_licences
self.params["p_licences"] = p_licences
self.params["personal_pictures"] = personal_pictures
self.params["register_phone"] = register_phone
self.params["verification_code"] = verification_code
return self.api_send(self.ACCOUNT_URL["doctor_register_post"])
# 医生后台-商户管理-医生管理列表--查看审核中的医生
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):
......
......@@ -247,4 +247,68 @@ file_upload:
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--查看审核中的医生
doctor_register:
method: get
url: /api/web/doctor/register
params:
doctorregister_id: ${doctorregister_id}
data: {}
json: {}
isLogin: 1 #需要登录
#医生后台-商户管理-医生管理列表--创建医生--提交创建单
doctor_register_post:
method: post
url: /api/web/doctor/register
params: {}
data:
profession_licences: ${profession_licences}
b_licences: ${b_licences}
p_licences: ${p_licences}
personal_pictures: ${personal_pictures}
register_phone: ${register_phone}
verification_code: ${verification_code}
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
......@@ -171,6 +171,19 @@ 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")
# 医生后台-商户管理-医生管理列表--创建医生发送验证码
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_REGISTER_POST = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "doctor_register_post.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")
......
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"]
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"]
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"]
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
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 TestDoctorRegisterPost:
data = BaseRequest().api_load(path_setting.DOCTOR_REGISTER_POST)
doctor_register_post_case, doctor_register_post_data = get_ids(data, "doctor_register_post")
@pytest.mark.parametrize("param",doctor_register_post_data,ids=doctor_register_post_case)
def test_doctor_register(self,param):
r = web_request().doctor_register_post(param["profession_licences"],
param["b_licences"],
param["p_licences"],
param["personal_pictures"],
param["register_phone"],
param["verification_code"])
# if r["error"] == 0:
assert r["data"]['code'] == param["code"]
assert r["data"]['message'] == param["message"]
account_code_online:
-
case: "医生后台-修改密码发送验证码 "
error: 0
csrfmiddlewaretoken: 'ICODxWkFPFGlGAX7cwzeXeszBnHzADuK'
message: '验证码已发送至您的手机'
#13221031104
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: ""
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: '错误的验证码'
doctor_register:
-
case: "医生后台-商户管理-医生管理列表--查看审核中的医生 "
assert: 0
doctorregister_id: 24086
\ No newline at end of file
doctor_register_post:
-
case: "医生后台-商户管理-医生管理列表--创建医生--提交创建单 "
assert: 0
profession_licences: '[]'
b_licences: '["https://heras.igengmei.com/doctor/2021/08/23/9ea8142bf3","https://heras.igengmei.com/doctor/2021/08/23/63aebceaab"]'
p_licences: '["https://heras.igengmei.com/doctor/2021/08/23/d08135f514","https://heras.igengmei.com/doctor/2021/08/23/c1da681094"]'
personal_pictures: '["https://heras.igengmei.com/service/2021/08/23/ba69400864"]'
register_phone: 13984574071
verification_code: 133131
code: 1
message: '验证码错误!'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment