#NEWLINE# def test_start_with_on_wait( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . proxy ( reset_master_mock = True , on_wait = self . on_wait_mock ) . start ( ) #NEWLINE# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# master_calls = self . proxy_start_calls ( [ mock . call . connection . drain_events ( timeout = self . de_period ) , mock . call . on_wait ( ) , mock . call . connection . drain_events ( timeout = master_calls . de_period ) , mock . call . on_wait ( ) , mock . call . connection . drain_events ( timeout = self . de_period ) ] , exc_type = KeyboardInterrupt ) #NEWLINE# self . master_mock . assert_has_calls ( master_calls )