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