#NEWLINE# def test_stream_endpoint( self ) : #NEWLINE# #INDENT# "\n        A streaming (aka hijacking) endpoint like /attach is permitted with no\n        post-hooks (the Docker response's content-type is detected and the\n        entire connection switched down into simple TCP-proxying mode (with\n        support for half-close).\n        " #NEWLINE# self . _configure ( 'endpoints: {}\nadapters: {}' , dockerArgs = dict ( rawStream = True ) ) #NEWLINE# d = self . client . post ( ( 'http://127.0.0.1:%d/towel' % ( self . proxyPort , ) ) , json . dumps ( { #NEWLINE# #INDENT# 'raw' : 'stream' , #NEWLINE# #UNINDENT# } ) , headers = { #NEWLINE# #INDENT# 'Content-Type' : [ 'application/json' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# def verify( response ) : #NEWLINE# #INDENT# self . assertEqual ( response . headers . getRawHeaders ( 'content-type' ) , [ 'application/vnd.docker.raw-stream' ] ) #NEWLINE# #UNINDENT# d . addCallback ( self ) #NEWLINE# return d