#NEWLINE# def test_right_username_and_wrong_password( self ) : #NEWLINE# #INDENT# user = auth . UserF ( username = 'foo' , password = HASH_FOR_123 , is_active = True ) #NEWLINE# form = self . app . get ( reverse ( 'journalmanager.user_login' ) ) . forms [ 0 ] #NEWLINE# form [ 'username' ] = 'foo' #NEWLINE# form [ 'password' ] = 'baz' #NEWLINE# response = form . submit ( ) #NEWLINE# self . assertTrue ( ( 'not a valid username or password' in response . body ) ) #NEWLINE# self . assertTemplateUsed ( user , 'registration/login.html' )