#NEWLINE# def test_login_user_id_invalid( self ) : #NEWLINE# #INDENT# 'Ensure login fails with an invalid user id' #NEWLINE# self . client . login ( username = 'authorized' , password = 'pass' ) #NEWLINE# response = self . client . post ( '/su/abc/' ) #NEWLINE# self . assertEqual ( response . status_code , 404 ) #NEWLINE# self . assertIn ( auth . SESSION_KEY , self . client . session ) #NEWLINE# self . assertEqual ( str ( response . client . session [ auth . SESSION_KEY ] ) , str ( self . authorized_user . id ) ) #NEWLINE# self . assertNotIn ( 'exit_users_pk' , self . client . session )