import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.tag_request import tag_request

class TestTagAdd:
    data = BaseRequest().api_load(path_setting.TAG_ADD)
    tag_add_case, tag_add_data = get_ids(data,"tag_add")
    @pytest.mark.parametrize("param",tag_add_data, ids=tag_add_case)
    def test_tag_add(self,param):
        r = tag_request().tag_add(param["name"])
        if r["error"] == 0:
            assert r["error"] == param["assert"]