Commit 0a2f0b3a authored by edz's avatar edz

修改密码

parent a9eba9ef
......@@ -157,6 +157,14 @@ class user_request(BaseRequest):
return self.api_send(self.data["change_pwd"])
# 修改密码
def change_pwdd(self, version, change_type, password, new_password, repeat_password):
self.params["version"] = version
self.params["change_type"] = change_type
self.params["password"] = password
self.params["new_password"] = new_password
self.params["repeat_password"] = repeat_password
return self.api_send(self.data["change_pwdd"])
......@@ -200,6 +208,9 @@ if __name__ == '__main__':
#忘记密码-修改密码
print(user_request().change_pwd('7.48.0',1,123456,123456))
#忘记密码-修改密码
print(user_request().change_pwdd('7.48.0',123456,1,123456,123456))
......@@ -223,3 +223,17 @@ change_pwd:
repeat_password: ${repeat_password}
json: {}
isLogin: 1
#修改密码
change_pwdd:
method: post
url: /api/user/change_pwd
params:
version: ${version}
data:
password: ${password}
change_type: ${change_type}
new_password: ${new_password}
repeat_password: ${repeat_password}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -641,6 +641,8 @@ FOLLOW_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data",
FOLLOW_DEL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_del.yaml")
#忘记密码-设置密码
CHANGE_PWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "change_pwd.yaml")
#修改密码
CHANGE_PWDD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "change_pwdd.yaml")
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
......
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 TestChangePwdd:
data = BaseRequest().api_load(path_setting.CHANGE_PWDD)
change_pwdd_case, change_pwdd_data = get_ids(data, "change_pwdd")
@pytest.mark.parametrize("param",change_pwdd_data, ids=change_pwdd_case)
def test_change_pwdd(self, param):
r = user_request().change_pwdd(param["version"],param["password"] ,param["change_type"],param["new_password"],param["repeat_password"])
if r.get("error_code") == 22006:
assert r["message"] == param["assert"]
elif r.get("error_code") == -1:
assert r["message"] == param["assert"]
elif r.get("error") == 0:
assert r["error"] == param["assert"]
# else:
# assert r["message"] == param["assert2"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment