import pytest

from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.accounts_request import send_reqest


class TestLoginPasswd:
    data = BaseRequest().api_load(path_setting.LOGIN_PASSWD)
    loginpasswd_case, loginpasswd_data = get_ids(data, "password")

    @pytest.mark.parametrize("param",loginpasswd_data,ids=loginpasswd_case)
    def test_login_passwd(self,param):
        print(param["password"])
        r = send_reqest().login_passwd(param["current_city_id"], param["phone"], param["password"])
        if r["error"] == 1:
            assert r["message"] == param["assert"]




