import pytest

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


class TestBaseSignData:
    data = BaseRequest().api_load(path_setting.BASE_SIGN_DATA)
    base_sign_data_case, base_sign_data_data = get_ids(data, "base_sign_data")

    @pytest.mark.parametrize("param", base_sign_data_data, ids=base_sign_data_case)
    def test_fbase_sign_data(self, param):
        r = user_request().base_sign_data(param["client_source"], param["json"],  param["version"], param["device_id"])

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

