import pytest

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


class TestPolymer:
    data = BaseRequest().api_load(path_setting.POLYMER)
    polymer_case, polymer_data = get_ids(data, "polymer")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", polymer_data, ids=polymer_case)
    def test_polymer(self, param):
        r = janus_request().polymer(param["version"], param["category_polymer_id"], param["device_id"])
        print('feng=', r)

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