#NEWLINE# def test_login_bad_creds( self ) : #NEWLINE# #INDENT# '\n        Test logins with bad/missing passwords\n        ' #NEWLINE# bad_creds = [ ] #NEWLINE# for ( key , val ) in six . iteritems ( self . auth_creds_dict ) : #NEWLINE# #INDENT# if ( key == 'username' ) : #NEWLINE# #INDENT# val = ( val + 'foo' ) #NEWLINE# #UNINDENT# bad_creds . append ( ( key , val ) ) #NEWLINE# #UNINDENT# response = self . fetch ( '/login' , method = 'POST' , body = urlencode ( bad_creds ) , headers = { #NEWLINE# #INDENT# 'Content-Type' : self . content_type_map [ 'form' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( response . code , 401 )