import pytest

import path_setting
from all_doctor_api.web_request import web_request
from ids_list import get_ids
from in_common.base_request import BaseRequest


class TestArticleVideotoken:

    article_videotoken = BaseRequest().api_load(path_setting.ARTICLE_DATA)
    ArticleVideotoken_case, ArticleVideotoken_data = get_ids(article_videotoken, "article_videotoken")

    @pytest.mark.parametrize("param",ArticleVideotoken_data,ids=ArticleVideotoken_case)
    def test_ArticleVideotokent(self,param):

        r = web_request().article_videotoken()
        print("======",r)
        if r["error"] == 0:
            assert r["error"] == param["assert"]
        # elif r["error"] == 1:
        #     assert r["message"] == params["assert"]