#NEWLINE# def test_load_chronos_config_bad( self ) : #NEWLINE# #INDENT# fake_path = '/dne' #NEWLINE# with contextlib . nested ( mock . patch ( 'paasta_tools.chronos_tools.open' , create = True , side_effect = IOError ( 2 , 'a' , 'b' ) ) ) as ( open_patch , ) : #NEWLINE# #INDENT# with raises ( chronos_tools . ChronosNotConfigured ) as excinfo : #NEWLINE# #INDENT# chronos_tools . load_chronos_config ( fake_path ) #NEWLINE# #UNINDENT# assert ( str ( fake_path . value ) == 'Could not load chronos config file b: a' )