import pytest

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


class TestPolymerizationContent:
    data = BaseRequest().api_load(path_setting.POLYMERIZATION)
    polymerization_content_case, polymerization_content_data = get_ids(data, "polymerization_content")

    @pytest.mark.parametrize("param", polymerization_content_data, ids=polymerization_content_case)
    def test_content(self, param):
        r = polymerization_request().content(param["tabtype"], param["category_polymer_id"],  param["page"], param["tag_ids"], param["operation_id"], param["level"],param["device_id"], param["current_city_id"], param["version"])

        assert r["error"] == param["assert"]


