Commit ab49a6fa authored by admin's avatar admin

Merge branch 'fgx_dev' into common_dev

商城首页接口
parents e4a30ede 6b50842b
import path_setting
from in_common.base_request import BaseRequest
class service_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.HOME_V5_CONFIG)
def home_v5(self):
return self.api_send(self.data["home_v5"])
if __name__ == '__main__':
print(service_request().home_v5())
\ No newline at end of file
home_v5:
method: get
url: /api/service/home/v5
params: {}
data: {}
json: {}
...@@ -30,5 +30,9 @@ HDYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hospital ...@@ -30,5 +30,9 @@ HDYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hospital
HOSPITAL_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospitals_data", "detail.yaml") HOSPITAL_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospitals_data", "detail.yaml")
HOME_V5_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "service_request.yaml")
HOME_V5=os.path.join(BASE_DIR,"backend_auto/test_backend_data/service_data","home_v5.yaml")
if __name__ == '__main__': if __name__ == '__main__':
print("==========",HOSTYAML_CONFIG) print("==========",HOSTYAML_CONFIG)
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.service_request import service_request
class TestHomeV5:
data = BaseRequest().api_load(path_setting.HOME_V5)
homev5_case, homev5_data = get_ids(data, "home_v5")
print(data)
@pytest.mark.parametrize("param",homev5_data,ids=homev5_case)
def test_home_v5(self,param):
#print(param["home_v5"])
r = service_request().home_v5()
print(r)
#if r["error"] == 0:
assert r["error"] == param["assert"]
home_v5:
#获取商城首页
-
case: "获取商城首页--case首页"
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