Esempio n. 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({})
Esempio n. 2
0
def test_user_profile_setemail_correct():
    
    user_profile_setemail(data, token, "*****@*****.**")
    user_profile_setemail(data, token, "*****@*****.**")
Esempio n. 3
0
def test_user_profile_setemail_invaild_token():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, 'invalidToken' , "*****@*****.**")
Esempio n. 4
0
def test_user_profile_setemail_long():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, token, "*****@*****.**")
Esempio n. 5
0
def test_user_profile_setemail_invalid_09():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, token, "she\/?rry@gmailcom")
Esempio n. 6
0
def test_user_profile_setemail_invalid_05():
    with pytest.raises(errors.ValueError):
        user_profile_setemail(data, token, "123")