#NEWLINE# def test_deprecation_message( self ) : #NEWLINE# #INDENT# msg = "Config file '%s' contains deprecated legacy config data. Please consider upgrading to the new config format. The tool 'bandit-config-generator' can help you with this. Support for legacy configs will be removed in a future bandit version." #NEWLINE# with mock . patch ( 'bandit.core.config.logger.warn' ) as m : #NEWLINE# #INDENT# self . config . _config = { #NEWLINE# #INDENT# 'profiles' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . config . validate ( '' ) #NEWLINE# self . assertEqual ( ( msg , '' ) , m . call_args_list [ 0 ] [ 0 ] )