import pytest

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


class TestSettlementDetail:
    data = BaseRequest().api_load(path_setting.SETTLEMENTDETAIL)
    detail_case, detail_data = get_ids(data, "settlement_detail")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", detail_data, ids=detail_case)
    def test_settlement_detail(self, param):
        r = settlement_request().detail(param["id"])
        if r["error"] == 0:
            assert r["error"] == param["assert"]
        else:
            assert r["error"] == param["assert"]

