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 TestCheckPwd:
    data = BaseRequest().api_load(path_setting.CHECK_PWD)
    check_pwd_case, check_pwd_data = get_ids(data, "check_pwd")

    @pytest.mark.parametrize("param",check_pwd_data, ids=check_pwd_case)
    def test_check_pwd(self, param):
        r = user_request().check_pwd()
        if r["error"] == 0:
            assert r["error"] == param["assert"]