import pytest

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


class TestFollowingOrFans:
    data = BaseRequest().api_load(path_setting.FOLLOWING_OR_FANS)
    following_or_fans_case, following_or_fans_data = get_ids(data, "following_or_fans")

    @pytest.mark.parametrize("param", following_or_fans_data, ids=following_or_fans_case)
    def test_following_or_fans(self, param):
        r = user_request().following_or_fans(param["start_num"], param["uid"],  param["type"], param["version"], param["current_city_id"], param["device_id"])

        assert r["error"] == param["assert"]

