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 TestBeautyCardOrderDetailWaitUse:
    data = BaseRequest().api_load(path_setting.BEAUTY_CARD_ORDER_DETAIL_DATA)
    beauty_card_order_detail_waituse_case, beauty_card_order_detail_waituse_data = get_ids(data, "beauty_card_order_detail_waituse")

    @pytest.mark.parametrize("param", beauty_card_order_detail_waituse_data, ids=beauty_card_order_detail_waituse_case)
    def test_beauty_card_order_detail_used(self, param):
        r = janus_request().beauty_card_order_detail(param["order_id"])
        data = r["data"]
        assert data["order_status"] == param["order_status"]
        assert data["vertifi_detail"]["vertifi_count"] == param["vertifi_count"]
        used_beautycard_detail = data["used_beautycard_detail"]
        assert used_beautycard_detail == {}

