import pytest

import path_setting
from all_om_api.beautycard_request import beautycard_request
from ids_list import get_ids
from in_common.base_request import BaseRequest

#更美次卡-删除/批量删除已添加页面次卡
class TestDeleteRelatedBc:
    data = BaseRequest().api_load(path_setting.DELETE_RELATED_BC)
    delete_related_bc_case, delete_related_bc_data = get_ids(data, "delete_related_bc")

    @pytest.mark.parametrize("param",delete_related_bc_data,ids=delete_related_bc_case)
    def test_delete_related_bc(self,param):
        r = beautycard_request().delete_related_bc(param["unit_id"], param["bc_sku_ids"], param["bc_spu_ids"], param["related_type"])
        if r["code"] == 0:
            assert r["data"] == param["assert"]
            print("成功删除已添加页面次卡")
        if r["code"] == 1:
            print("未删除已添加页面次卡")