Commit 078e97eb authored by 林颖's avatar 林颖

医生后台--创建医生&发送验证码

parent 4c76a2d6
......@@ -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
......
......@@ -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
......@@ -155,16 +155,22 @@ 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")
......
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
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"]
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
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
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