import pytest

import path_setting
from all_backend_api.search_request import search_request
from ids_list import get_ids
from in_common.base_request import BaseRequest

#搜索首页-更美热门榜
class TestHot:
    data = BaseRequest().api_load(path_setting.HOT)
    hot_case, hot_data = get_ids(data, "hot")

    @pytest.mark.parametrize("param", hot_data, ids=hot_case)
    def test_hot(self, param):
        r = search_request().hot(param["version"])
        if r["error"] == 0:
            print("接口调用成功了~")
            assert len(["data"]) != param["assert"]