import pytest

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


class TestBeautyCardOrderSubmit:
    data = BaseRequest().api_load(path_setting.BEAUTY_CARD_ORDER_SUBMIT)
    beauty_card_order_submit_case, beauty_card_order_submit_data = get_ids(data, "beauty_card_order_submit")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", beauty_card_order_submit_data, ids=beauty_card_order_submit_case)
    def test_beauty_card_order_submit(self, param):
        r = janus_request().beauty_card_order_submit(param["phone"], param["sku_id"], param["number"],
                                                     param["is_doctor_see"], param["gain_coupon_id"],
                                                     param["deduction_price"])
        print("返回结果", r)
        if r["error"] == 0:
            assert r["error"] == param["assert_error"]

