#NEWLINE# def test_deprecation( self ) : #NEWLINE# #INDENT# with warnings . catch_warnings ( record = True ) as w : #NEWLINE# #INDENT# warnings . simplefilter ( 'always' ) #NEWLINE# Delivery ( base_config ) #NEWLINE# assert ( len ( w ) == 1 ) , 'No, or more than one, warning issued.' #NEWLINE# assert issubclass ( w [ ( - 1 ) ] . category , DeprecationWarning ) , 'Category of warning is not DeprecationWarning.' #NEWLINE# assert ( 'deprecated' in str ( w [ ( - 1 ) ] . message ) ) , "Warning does not include 'deprecated'." #NEWLINE# assert ( 'Mailer' in str ( w [ ( - 1 ) ] . message ) ) , 'Warning does not include correct class name.' #NEWLINE# assert ( 'Delivery' in str ( w [ ( - 1 ) ] . message ) ) , 'Warning does not include old class name.'