#NEWLINE# def test_notify_no_email( self ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'query' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'custom_label' : 'Test Alert' , #NEWLINE# #UNINDENT# } #NEWLINE# assert ( self . role_no_email . email is None ) , self . role_no_email . email #NEWLINE# alert = Alert . create ( data , self . role_no_email ) #NEWLINE# alert . notified_at = ( datetime . utcnow ( ) - timedelta ( hours = 72 ) ) #NEWLINE# db . session . commit ( ) #NEWLINE# with mail . record_messages ( ) as outbox : #NEWLINE# #INDENT# check_alerts ( ) #NEWLINE# assert ( len ( outbox ) == 0 ) , alert