Beispiel #1
0
def setEmail():
    data = getData()
    email, token = (request.form[x] for x in ('email', 'token'))
    checkTokenValidity(token, data)

    user_profile_setemail(data, token, email)
    return sendSuccess({})
Beispiel #2
0
def test_user_profile_setemail_correct():
    
    user_profile_setemail(data, token, "*****@*****.**")
    user_profile_setemail(data, token, "*****@*****.**")
Beispiel #3
0
def test_user_profile_setemail_invaild_token():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, 'invalidToken' , "*****@*****.**")
Beispiel #4
0
def test_user_profile_setemail_long():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, token, "*****@*****.**")
Beispiel #5
0
def test_user_profile_setemail_invalid_09():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, token, "she\/?rry@gmailcom")
Beispiel #6
0
def test_user_profile_setemail_invalid_05():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, token, "123")