import pytest

from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web3_request import web3_request


class TestTagFirstList:
    data = BaseRequest().api_load(path_setting.TAGFIRSTLIST)
    tag_first_list_case, tag_first_list_data = get_ids(data, "tag_first_list")


    @pytest.mark.parametrize("param",tag_first_list_data,ids=tag_first_list_case)
    def test_tag_first_list(self, param):
        '''私信机器人-获取一级类目'''
        r = web3_request().tag_first_list()
        if r["error"] == 0:
            #data = r.get("data").get("data", [])
            #assert len["data"] >= param["assert"]
            assert r["data"]["total"] >= param["assert"]
