import pytest

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


class TestTagAll:

    tag_all = BaseRequest().api_load(path_setting.TAG_DATA)
    TagAll_case, TagAll_data = get_ids(tag_all, "tag_all")

    @pytest.mark.parametrize("param", TagAll_data, ids=TagAll_case)
    def test_TagAll(self, param):

        r = web2_request().tag_all()
        print("--------",r)

        if r["error"] == 0:
            assert r["error"] == param["assert"]

        # elif r["error"] == 1:
        #     assert r["data"] == params["assert"]