import pytest

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

# 测颜值底部feed流
class TestScanDiaryCards:
    data = BaseRequest().api_load(path_setting.SCAN_DIARY_CARDS_DATA)
    scandiarycards_case, scandiarycards_data = get_ids(data, "diary_cards")

    @pytest.mark.skip
    @pytest.mark.parametrize("param",scandiarycards_data,ids=scandiarycards_case)
    def test_diary_cards(self,param):
        r = scan_request().scan_diary_cards(param["current_city_id"], param["page"], param["count"], param["feature_results"],param["feed_type"])
        assert r["error"] == 0
        assert len(r["data"]) == param["assert_nums"]