import pytest

import path_setting
from all_backend_api.visual_beauty_card import visual_beauty_card_request
from ids_list import get_ids
from in_common.base_request import BaseRequest

#次卡商品列表筛选器接口
class TestBeautyCardFilters:
    data = BaseRequest().api_load(path_setting.BEAUTYCARD_FILTERS)
    beautycard_filters_case, beautycard_filters_data = get_ids(data, "beautycard_filters")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", beautycard_filters_data, ids=beautycard_filters_case)
    def test_beautycard_filters(self, param):
        print('次卡商品列表筛选器')
        r = visual_beauty_card_request().beautycard_filters(param["unit_id"], param["current_city_id"], param["version"])
        if r["data"]:
            print('次卡商品列表筛选器下拉列表有值')
            assert len(r["data"]["field"]) != param["assert"]
            assert len(r["data"]["areas"]) != param["assert"]
            assert len(r["data"]["order"]) != param["assert"]