Commit 6b50842b authored by admin's avatar admin

商城首页接口

parent 42c6066e
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: {}
......@@ -7,5 +7,9 @@ HOSTYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto", "host.yaml")
APYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
LOGIN_VFC = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "login_vfc.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__':
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