def test_setemail01(): new_user = create_user() setemail(new_user['token'],"*****@*****.**") new_user_dictionary = { "u_id": new_user['u_id'], "email": '*****@*****.**', "name_first": "John", "name_last": "Smith", "handle_str": "JohnSmith" } assert profile(new_user['token'],['u_id']) == new_user_dictionary
def test_setemail06(): new_user = create_user() with pytest.raises(AccessError): setemail('NOT_VALID_TOKEN','*****@*****.**')
def test_setemail05(): test_user = auth.register("*****@*****.**", "Test", "John", "Smith") new_user = create_user() #New_user will be trying to change their email to test_ with pytest.raises(InputError): setemail(new_user['token'],'*****@*****.**')
def test_setemail04(): new_user = create_user() with pytest.raises(InputError): setemail(new_user['token'],'gmailgmail.com')
def test_setemail02(): new_user = create_user() #New Email with no personal info with pytest.raises(InputError): setemail(new_user['token'],'@gmail.com')
def user_setemail(): data = request.get_json() return dumps(user.setemail(data["token"], data["email"]))