import pytest

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


class TestShareData:
    data = BaseRequest().api_load(path_setting.SERVICES_SHARE_DATA)
    share_data_case, share_data_data = get_ids(data, "share_data")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", share_data_data, ids=share_data_case)
    def test_share_data(self, param):
        r = services_request().share_data(param["p_id"], param["u_id"])

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

        # print(services_request().share_data())

