#NEWLINE# def test_invalid_email_change_token( self ) : #NEWLINE# #INDENT# u1 = User ( email = 'user@example.com' , password = 'password' ) #NEWLINE# u2 = User ( email = 'otheruser@example.org' , password = 'notpassword' ) #NEWLINE# db . session . add ( u1 ) #NEWLINE# db . session . add ( u2 ) #NEWLINE# db . session . commit ( ) #NEWLINE# token = u1 . generate_email_change_token ( 'otherotheruser@example.net' ) #NEWLINE# self . assertFalse ( u2 . change_email ( token ) ) #NEWLINE# self . assertTrue ( ( u2 . email == 'otheruser@example.org' ) )