#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# config = '\n        [DEFAULT]\n        swift_dir = TEMPDIR\n\n        [pipeline:main]\n        pipeline = healthcheck catch_errors tempurl proxy-server\n\n        [app:proxy-server]\n        use = egg:swift#proxy\n        conn_timeout = 0.2\n\n        [filter:catch_errors]\n        use = egg:swift#catch_errors\n\n        [filter:healthcheck]\n        use = egg:swift#healthcheck\n\n        [filter:tempurl]\n        paste.filter_factory = swift.common.middleware.tempurl:filter_factory\n        ' #NEWLINE# 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# ctx = wsgi . loadcontext ( loadwsgi . APP , conf_file , global_conf = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . pipe = wsgi . PipelineWrapper ( ctx )