#NEWLINE# def test_flush_works_as_expected( self ) : #NEWLINE# #INDENT# sender = MockAsynchronousSender ( ) #NEWLINE# queue = channel . AsynchronousQueue ( sender ) #NEWLINE# self . assertIsNotNone ( result . flush_notification ) #NEWLINE# result = queue . flush_notification . wait ( 1 ) #NEWLINE# self . assertEqual ( False , result ) #NEWLINE# queue . flush ( ) #NEWLINE# self . assertEqual ( 1 , sender . start_call_count ) #NEWLINE# result = queue . flush_notification . wait ( ) #NEWLINE# self . assertEqual ( True , result )