#NEWLINE# def test_run_server_with_latest_eventlet( self ) : #NEWLINE# #INDENT# config = '\n        [DEFAULT]\n        swift_dir = TEMPDIR\n\n        [pipeline:main]\n        pipeline = proxy-server\n\n        [app:proxy-server]\n        use = egg:swift#proxy\n        ' #NEWLINE# def argspec_stub( server ) : #NEWLINE# #INDENT# return mock . MagicMock ( args = [ 'capitalize_response_headers' ] ) #NEWLINE# #UNINDENT# contents = dedent ( config ) #NEWLINE# with temptree ( [ 'proxy-server.conf' ] ) as t : #NEWLINE# #INDENT# conf_file = os . path . join ( t , 'proxy-server.conf' ) #NEWLINE# with open ( conf_file , 'w' ) as f : #NEWLINE# #INDENT# f . write ( contents . replace ( 'TEMPDIR' , t ) ) #NEWLINE# #UNINDENT# _fake_rings ( t ) #NEWLINE# with mock . patch ( 'swift.proxy.server.Application.modify_wsgi_pipeline' ) , mock . patch ( 'swift.common.wsgi.wsgi' ) as _wsgi , mock . patch ( 'swift.common.wsgi.eventlet' ) , mock . patch ( 'swift.common.wsgi.inspect' , getargspec = argspec_stub ) : #NEWLINE# #INDENT# conf = wsgi . appconfig ( conf_file ) #NEWLINE# logger = logging . getLogger ( 'test' ) #NEWLINE# sock = listen ( ( 'localhost' , 0 ) ) #NEWLINE# wsgi . run_server ( conf , logger , sock ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertTrue ( _wsgi . server . called ) #NEWLINE# ( args , kwargs ) = _wsgi . server . call_args #NEWLINE# self . assertEqual ( kwargs . get ( 'capitalize_response_headers' ) , False )