Commit 690801fd authored by 陈雪's avatar 陈雪

编辑商品

parent 7171bf3d
......@@ -40,6 +40,12 @@ class web2_request(BaseRequest):
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.SERVICE_URL["service_delete"])
def service_deletelist(self,page):
#我的商品-商品回收站
self.params["page"] = page
return self.api_send(self.SERVICE_URL["service_deletelist"])
if __name__ == '__main__':
print(web2_request().service_list("1", "10", "-1", "-1"))
......@@ -47,3 +53,5 @@ if __name__ == '__main__':
print(web2_request().servicereview_option("209989", "1", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().tag_all())
print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().service_deletelist("1"))#商品回收站
......@@ -6,10 +6,7 @@ service_list:
pagesize: ${pagesize}
is_online: ${is_online}
extra_filter_choice: ${extra_filter_choice}
data:
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
data: {}
json: {}
isLogin: 1
......@@ -21,10 +18,7 @@ service_review_list:
page: ${page}
pagesize: ${pagesize}
type: ${type}
data:
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
data: {}
json: {}
isLogin: 1
......@@ -37,9 +31,6 @@ servicereview_option:
id: ${id}
type: ${type}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
json: {}
isLogin: 1
......@@ -55,10 +46,20 @@ tag_all:
service_delete:
method: POST
url: /api/web2/service/delete
param: {}
params: {}
data:
is_delete: ${is_delete}
service_register_id: ${service_register_id}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1
service_deletelist:
method: get
url: /api/web2/service/delete/list
params:
page: ${page}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -40,15 +40,33 @@ class web_request(BaseRequest):
self.params["doctor_user_id"] = doctor_user_id
return self.api_send(self.ACCOUNT_URL["conversation_coupon"])
def service_all(self):
return self.api_send(self.ACCOUNT_URL["service_all"])
def file_upload(self, img_type,csrfmiddlewaretoken,id,name,type,lastModifiedDate,size,file):
self.params["img_type"] = img_type
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
self.params["id"] = id
self.params["name"] = name
self.params["type"] = type
self.params["lastModifiedDate"] = lastModifiedDate
self.params["size"] = size
self.params["file"] = file
return self.api_send(self.ACCOUNT_URL["file_upload"])
if __name__ == '__main__':
print(web_request().account_unreadbadgecount())
print(web_request().article_videotoken())
print(web_request().doctor_submechanisms())
print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web_request().conversation(0, 1))
print(web_request().conversation_unread_list(1))
print(web_request().service())
print("发送")
print(web_request().conversation_diary(602329))
print(web_request().conversation_coupon(602329))
# print(web_request().account_unreadbadgecount())
# print(web_request().article_videotoken())
# print(web_request().doctor_submechanisms())
# print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
# print(web_request().conversation(0, 1))
# print(web_request().conversation_unread_list(1))
# print(web_request().service())
# print("发送")
# print(web_request().conversation_diary(602329))
# print(web_request().conversation_coupon(602329))
# print(web_request().service_all())
print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
\ No newline at end of file
......@@ -81,3 +81,29 @@ conversation_coupon:
data: {}
json: {}
isLogin: 1 #需要登录
service_all:
method: get
url: /api/web/service/all
params: {}
data: {}
json: {}
isLogin: 1
file_upload:
method: post
url: /api/web/file/upload
param: {}
data:
img_type: ${img_type}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
id: ${id}
name: ${name}
type: ${type}
lastModifiedDate: ${lastModifiedDate}
size: ${size}
file: ${file}
json: {}
isLogin: 1
\ No newline at end of file
develop_host:
backend: http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
# backend: http://backend.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -72,6 +72,7 @@ class BaseRequest:
# proxies={"http":"172.30.9.226:8888"}
)
print("0000000",r)
return r.json()
# 随机生成trace_id
......
......@@ -60,7 +60,11 @@ DELETE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "s
#医生后台-编辑可标准化商品
PROPERTIES_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/glmer_data", "tag_properties.yaml")
#医生后台-商品回收站
DELETELIST_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "service_deletelist.yaml")
#医生后台-上线商品、编辑商品
SERVICEALL_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "service_all.yaml")
#搜索首页-热门搜索
KEYWORDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
......
import pytest
import path_setting
from all_doctor_api.web2_request import web2_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceDeletelist:
service_deletelist = BaseRequest().api_load(path_setting.DELETELIST_DATA)
ServiceDeletelist_case, ServiceDeletelist_data = get_ids(service_deletelist, "service_deletelist")
@pytest.mark.parametrize("params" ,ServiceDeletelist_data ,ids=ServiceDeletelist_case)
def test_ServiceDeletelist(self ,params):
r = web2_request().service_deletelist(params['page'])
print("======" ,r)
# if r["error"] == 0:
# assert r["error"] == params["assert"]
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 TestServiceAll:
service_all = BaseRequest().api_load(path_setting.SERVICEALL_DATA)
ServiceAll_case, ServiceAll_data = get_ids(service_all, "service_all")
@pytest.mark.parametrize("param",ServiceAll_data,ids=ServiceAll_case)
def test_ServiceAll(self,param):
r = web_request().service_all()
print("=====",r)
if r["error"] == 0:
assert r["error"] == param["assert"]
\ No newline at end of file
service_deletelist:
#我的商品-商品回收站
-
case: "我的商品-商品回收站"
page: "1"
assert: 0
\ No newline at end of file
service_all:
-
case: "编辑商品、上线商品"
assert: 0
\ No newline at end of file
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