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 TestAccountCodeOnline:
    data = BaseRequest().api_load(path_setting.DOCTOR_CODE_ONLINE)
    account_code_online_case, account_code_online_data = get_ids(data, "account_code_online")

    @pytest.mark.parametrize("param",account_code_online_data,ids=account_code_online_case)
    def test_account_code_online(self,param):
        r = web_request().account_code_online(param["csrfmiddlewaretoken"])
        assert r["error"] == param["error"]
        assert r["message"] == param["message"]
