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 TestCreateV1:
    data = BaseRequest().api_load(path_setting.CREATE)
    create_case, create_data = get_ids(data, "create_v1")
    print(create_data)

    @pytest.mark.parametrize("param", create_data, ids=create_case)
    def test_create_v1(self, param):
        r = settlement_request().create_v1(param["service_item_id"],param["number"],param["platform_coupon_id"],
                                           param["use_point"],param["is_doctor_see"],param["doctor_coupon_id"],
                                           param["insurance_info"],param["is_create_groupbuy"])
        print(r)
        assert r["error"] == param["assert"]

