#NEWLINE# def test_invalid_credentials( self ) : #NEWLINE# #INDENT# user = self . data . user #NEWLINE# form_data = self . get_form_data ( user ) #NEWLINE# form_data [ 'password' ] = 'invalid' #NEWLINE# exc = keystone_exceptions . Unauthorized ( 401 ) #NEWLINE# self . _mock_client_password_auth_failure ( user . name , 'invalid' , exc ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# url = reverse ( 'login' ) #NEWLINE# response = self . client . get ( url , form_data ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# response = self . client . post ( url , form_data ) #NEWLINE# self . assertTemplateUsed ( response , 'auth/login.html' ) #NEWLINE# self . assertContains ( response , 'Invalid credentials.' )