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 TestAccountPassword:
    data = BaseRequest().api_load(path_setting.DOCTOR_PASSWORD)
    account_password_case, account_password_data = get_ids(data, "account_password")

    @pytest.mark.parametrize("param",account_password_data,ids=account_password_case)
    def test_account_password(self,param):
        r = web_request().account_password(param["new_password"], param["code"])

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