Commit 9ac92c0e authored by 陈雪's avatar 陈雪

商品下线

parents 9f702620 18c6d3fc
......@@ -4,17 +4,21 @@ from in_common.base_request import BaseRequest
class web_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.ACCOUNT_URL)
self.ACCOUNT_URL = self.api_load(path_setting.ACCOUNT_URL)
def account_unreadbadgecount(self) :
return self.api_send(self.data["account_unreadbadgecount"])
return self.api_send(self.ACCOUNT_URL["account_unreadbadgecount"])
def article_videotoken(self) :
return self.api_send(self.data["article_videotoken"])
return self.api_send(self.ACCOUNT_URL["article_videotoken"])
def doctor_submechanisms(self) :
return self.api_send(self.data["doctor_submechanisms"])
return self.api_send(self.ACCOUNT_URL["doctor_submechanisms"])
def service_offline(self,id,csrfmiddlewaretoken):
self.params["id"] = id
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
return self.api_send(self.ACCOUNT_URL["service_offline"])
......@@ -24,3 +28,4 @@ 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"))
......@@ -27,3 +27,12 @@ doctor_submechanisms:
isLogin: 1
service_offline:
method: post
url: /api/web/service/offline
param: {}
data:
id: ${id}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
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
......@@ -58,6 +58,9 @@ REGISTER_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/glmer_data",
#医生后台-编辑商品
DETAIL_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/glmer_data", "service_detail.yaml")
#医生后台-我的商品-下线商品
OFFLINE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "service_offline.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")
......
......@@ -15,7 +15,6 @@ class TestDoctorSubmechanisms:
def test_DoctorSubmechanisms_data(self,param):
r = web_request().doctor_submechanisms()
print("=======",r)
if r["error"] == 0:
assert r["error"] == param["assert"]
# elif r["error"] == 1:
......
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 TestServiceOffline:
service_offline = BaseRequest().api_load(path_setting.OFFLINE_DATA)
ServiceOffline_case, ServiceOffline_data = get_ids(service_offline, "service_offline")
@pytest.mark.parametrize("params",ServiceOffline_data,ids=ServiceOffline_case)
def test_ServiceOffline_data(self,params):
r = web_request().service_offline(params['id'],params['csrfmiddlewaretoken'])
print("=======",r)
if r["error"] == 0:
assert r["error"] == params["assert"]
service_offline:
-
case: "我的商品-下线商品"
id: 209992
csrfmiddlewaretoken: PC8uTySuxipukIMuqNV1OPB376C2ZZ3g
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