Commit 72053e31 authored by 陈雪's avatar 陈雪

商品编辑

parents 2044db71 353bbacb
...@@ -40,6 +40,12 @@ class web2_request(BaseRequest): ...@@ -40,6 +40,12 @@ class web2_request(BaseRequest):
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.SERVICE_URL["service_delete"]) 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__': if __name__ == '__main__':
...@@ -48,3 +54,5 @@ if __name__ == '__main__': ...@@ -48,3 +54,5 @@ if __name__ == '__main__':
print(web2_request().servicereview_option("209989", "1", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g")) print(web2_request().servicereview_option("209989", "1", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().tag_all()) print(web2_request().tag_all())
print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g")) print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().service_deletelist("1"))#商品回收站
...@@ -6,10 +6,7 @@ service_list: ...@@ -6,10 +6,7 @@ service_list:
pagesize: ${pagesize} pagesize: ${pagesize}
is_online: ${is_online} is_online: ${is_online}
extra_filter_choice: ${extra_filter_choice} extra_filter_choice: ${extra_filter_choice}
data: data: {}
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
json: {} json: {}
isLogin: 1 isLogin: 1
...@@ -21,10 +18,7 @@ service_review_list: ...@@ -21,10 +18,7 @@ service_review_list:
page: ${page} page: ${page}
pagesize: ${pagesize} pagesize: ${pagesize}
type: ${type} type: ${type}
data: data: {}
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
json: {} json: {}
isLogin: 1 isLogin: 1
...@@ -37,9 +31,6 @@ servicereview_option: ...@@ -37,9 +31,6 @@ servicereview_option:
id: ${id} id: ${id}
type: ${type} type: ${type}
csrfmiddlewaretoken: ${csrfmiddlewaretoken} csrfmiddlewaretoken: ${csrfmiddlewaretoken}
phone_num: ${phone_num}
vfc_code: ${vfc_code}
face_token: ${face_token}
json: {} json: {}
isLogin: 1 isLogin: 1
...@@ -55,7 +46,7 @@ tag_all: ...@@ -55,7 +46,7 @@ tag_all:
service_delete: service_delete:
method: POST method: POST
url: /api/web2/service/delete url: /api/web2/service/delete
param: {} params: {}
data: data:
is_delete: ${is_delete} is_delete: ${is_delete}
service_register_id: ${service_register_id} service_register_id: ${service_register_id}
...@@ -64,4 +55,15 @@ service_delete: ...@@ -64,4 +55,15 @@ service_delete:
isLogin: 1 isLogin: 1
<<<<<<< HEAD
=======
service_deletelist:
method: get
url: /api/web2/service/delete/list
params:
page: ${page}
data: {}
json: {}
isLogin: 1
>>>>>>> xue_dev
...@@ -40,6 +40,22 @@ class web_request(BaseRequest): ...@@ -40,6 +40,22 @@ class web_request(BaseRequest):
self.params["doctor_user_id"] = doctor_user_id self.params["doctor_user_id"] = doctor_user_id
return self.api_send(self.ACCOUNT_URL["conversation_coupon"]) 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__': if __name__ == '__main__':
print(web_request().account_unreadbadgecount()) print(web_request().account_unreadbadgecount())
...@@ -52,3 +68,5 @@ if __name__ == '__main__': ...@@ -52,3 +68,5 @@ if __name__ == '__main__':
print("发送") print("发送")
print(web_request().conversation_diary(602329)) print(web_request().conversation_diary(602329))
print(web_request().conversation_coupon(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: ...@@ -81,3 +81,29 @@ conversation_coupon:
data: {} data: {}
json: {} json: {}
isLogin: 1 #需要登录 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: 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 # backend: https://backend.igengmei.com
...@@ -73,6 +73,8 @@ class BaseRequest: ...@@ -73,6 +73,8 @@ class BaseRequest:
# proxies={"http":"172.30.9.226:8888"} # proxies={"http":"172.30.9.226:8888"}
) )
print("0000000",r)
return r.json()
try: try:
content_type = r.headers.get("content-type").split(";")[0] content_type = r.headers.get("content-type").split(";")[0]
except: except:
......
...@@ -105,6 +105,15 @@ DELETE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "s ...@@ -105,6 +105,15 @@ 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") 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")
KEYWORDS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "keywords.yaml")
# 首页灰度v9,精选tab # 首页灰度v9,精选tab
FEED_INDEXV9_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml") 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.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