#NEWLINE# def test_shutdown( self ) : #NEWLINE# #INDENT# mock_thread = mock . Mock ( ) #NEWLINE# mock_service_thread_map = { #NEWLINE# #INDENT# self . mock_service : mock_thread , #NEWLINE# #UNINDENT# } #NEWLINE# self . pantsd . shutdown ( mock_service_thread_map ) #NEWLINE# self . mock_service . terminate . assert_called_once_with ( ) #NEWLINE# self . assertTrue ( self . pantsd . is_killed ) #NEWLINE# mock_thread . join . assert_called_once_with ( )