#NEWLINE# def test_shutdown_sockets( self ) : #NEWLINE# #INDENT# self . mock_get_socket . return_value = mock . MagicMock ( ) #NEWLINE# self . strategy . bind_ports ( ) #NEWLINE# with mock . patch ( 'swift.common.wsgi.greenio' ) as mock_greenio : #NEWLINE# #INDENT# self . strategy . shutdown_sockets ( ) #NEWLINE# #UNINDENT# self . assertEqual ( [ mock . call . shutdown_safe ( self . mock_get_socket . return_value ) ] , mock_greenio . mock_calls ) #NEWLINE# self . assertEqual ( [ mock . call . close ( ) ] , self . mock_get_socket . return_value . mock_calls )