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 TestUpdateBcRank:
    data = BaseRequest().api_load(path_setting.UPDATE_BC_RANK)
    update_bc_rank_case, update_bc_rank_data = get_ids(data, "update_bc_rank")

    @pytest.mark.parametrize("param",update_bc_rank_data,ids=update_bc_rank_case)
    def test_update_bc_rank(self,param):
        r = beautycard_request().update_bc_rank(param["unit_id"], param["related_id"], param["related_type"], param["rank"])
        if r["code"] == 0:
            print("成功修改已添加页面该次卡排序")
            assert r["data"] == param["assert"]
        if r["code"] == 1:
            print("未能修改已添加页面该次卡排序")