Пример #1
0
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
Пример #2
0
 def test_checkUsernameExists(self):
     db.checkUserNameExists('riz')
     assert True
Пример #3
0
def restPasswordSubmit():
    username = request.forms.get("username")
    db.checkUserNameExists(username)
    return view("auth/resetPassword.html")
Пример #4
0
def restPasswordSubmit():
    username = request.forms.get('username')
    db.checkUserNameExists(username)
    return view('auth/resetPassword.html')
Пример #5
0
 def test_checkUsernameExists(self):
     db.checkUserNameExists("riz")
     assert True