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 TestMyAnswer:
    data = BaseRequest().api_load(path_setting.MY_ANSWER)
    my_answer_case, my_answer_data = get_ids(data, "my_answer")

    @pytest.mark.parametrize("param", my_answer_data, ids=my_answer_case)
    def test_my_answer(self, param):
        r = user_request().my_answer(param["start_num"], param["count"])

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

