import pytest

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


class TestDiaryAlbum:
    data = BaseRequest().api_load(path_setting.DIARY_ALBUM)
    diary_album_case, diary_album_data = get_ids(data, "diary_album")

    @pytest.mark.parametrize("param", diary_album_data, ids=diary_album_case)
    def test_diary_album(self, param):
        r = hybrid_diary_request().diary_album()
        # print(r)
        if r["error"] == 0:
            assert r["data"][2]["images"][0]["is_cover"] == param["assert"]
            assert r["data"][0]["images"][0]["is_cover"] == param["assert2"]






