def validate_username(username): errors = [] if not username: errors.append('No username provided') elif len(username) < 6: errors.append('Username must have atleast 6 characters') elif db.checkUserNameExists(username): errors.append('Username exists') return errors
def test_checkUsernameExists(self): db.checkUserNameExists('riz') assert True
def restPasswordSubmit(): username = request.forms.get("username") db.checkUserNameExists(username) return view("auth/resetPassword.html")
def restPasswordSubmit(): username = request.forms.get('username') db.checkUserNameExists(username) return view('auth/resetPassword.html')
def test_checkUsernameExists(self): db.checkUserNameExists("riz") assert True