#NEWLINE# def test_failure_limit_by_username_once( self ) : #NEWLINE# #INDENT# ' Tests the login lock by username when trying to login\n        one more time than failure limit\n        ' #NEWLINE# for i in range ( 0 , config . FAILURE_LIMIT ) : #NEWLINE# #INDENT# ip = '74.125.239.{0}.' . format ( i ) #NEWLINE# response = self . _login ( username = VALID_USERNAME , remote_addr = ip ) #NEWLINE# self . assertContains ( response , LOGIN_FORM_KEY ) #NEWLINE# #UNINDENT# response = self . _login ( ) #NEWLINE# self . assertContains ( response , self . LOCKED_MESSAGE ) #NEWLINE# response = self . client . get ( ADMIN_LOGIN_URL ) #NEWLINE# self . assertContains ( response , self . LOCKED_MESSAGE )