Commit c26aa0ea authored by 张淑琴's avatar 张淑琴

Merge branch 'common_dev' of http://git.wanmeizhensuo.com/dengyingying/backend_auto into common_dev

parents 96e4ee12 e26513b5
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"))
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
......@@ -18,6 +18,8 @@ class web_request(BaseRequest):
if __name__ == '__main__':
print(web_request().account_unreadbadgecount())
print(web_request().article_videotoken())
......
......@@ -26,3 +26,4 @@ doctor_submechanisms:
json: {}
isLogin: 1
......@@ -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")
......
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
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
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