#NEWLINE# def test_netrc_no_usable_blocks( self , MockOsPath ) : #NEWLINE# #INDENT# with self . netrc ( '' ) as netrc : #NEWLINE# #INDENT# with self . assertRaises ( MockOsPath . NetrcError ) as exc : #NEWLINE# #INDENT# netrc . _ensure_loaded ( ) #NEWLINE# #UNINDENT# assert ( str ( exc . exception ) == 'Found no usable authentication blocks in ~/.netrc' )