def test_09_modify_pwdNomatchRules(self): """修改密码不符合规则""" logging.info(r'==修改密码不符合规则用例==') find = FindPwdView(self.driver) data = find.get_csv_data('../data/pwd.csv', 8) find.findpwd_action(data[0], data[1]) find.modify_action(data[2], data[3]) self.assertTrue(find.check_modify_pwd_fail_status())
def test_07_modify_pwdEmpty(self): """修改密码密码为空""" logging.info(r'==修改密码密码为空用例==') find = FindPwdView(self.driver) data = find.get_csv_data('../data/pwd.csv', 6) find.findpwd_action(data[0], data[1]) find.modify_action(data[2], data[3]) self.assertTrue(find.check_modify_pwd_fail_status())
def test_11_modify_pwdRepeat(self): """新旧密码不一致""" logging.info(r'==修改密码新旧密码重复用例==') find = FindPwdView(self.driver) data = find.get_csv_data('../data/pwd.csv', 11) find.findpwd_action(data[0], data[2]) find.modify_action(data[3], data[3]) self.assertTrue(find.check_modify_pwd_fail_status())
def test_10_modify_pwdInconsistent(self): """修改密码前后不一致""" logging.info(r'==修改密码输入前后不一致用例==') find = FindPwdView(self.driver) data = find.get_csv_data('../data/pwd.csv', 9) find.findpwd_action(data[0], data[1]) find.modify_action(data[2], data[3]) self.assertTrue(find.check_modify_pwd_fail_status())
def test_24_modify_pwdNomatchLength(self): """修改密码不符合长度""" logging.info(r'==修改密码不符合长度用例==') find = FindPwdView(self.driver) data = find.get_csv_data('../data/test_data/pwd.csv', 7) find.findpwd_action(data[0], data[1]) find.modify_action(data[2], data[3]) sleep(2) self.assertTrue(find.check_modify_pwd_fail_status())
def test_01_modify_pwdSuccess(self): """修改密码成功""" logging.info(r'==修改密码成功用例==') find = FindPwdView(self.driver) data0 = find.get_csv_data('../data/login_data.csv', 1) data1 = find.get_csv_data('../data/pwd.csv', 10) data2 = find.get_csv_data('../data/pwd.csv', 11) find.findpwd_action(data1[0], data1[2]) find.modify_action(data1[3], data1[3]) self.assertTrue(find.check_find_pwd_success_status()) find.update_csv_data('../data/login_data.csv', 1, '正式账号', data0[2], data1[3]) find.update_csv_data('../data/pwd.csv', 1, '密码相同', data2[3], data1[3]) logging.info(pwd) find.update_csv_data('../data/pwd.csv', 1, '修改密码', data1[3], pwd)