#NEWLINE# def test_adding_one_then_two_pre_hook_adapter( self ) : #NEWLINE# #INDENT# '\n        Chaining pre-hooks: adding +1 and then +2 gives you +3.\n\n        Note that the naming here is confusing. the adapter "adder2" here is\n        defined as being a **different adapter** to "adder", which increments\n        by 2.\n        ' #NEWLINE# d = self . _hookTest ( 'endpoints:\n  "POST %(dockerEndpoint)s":\n    pre: [adder, adder2]\n    post: []\nadapters:\n  adder: http://127.0.0.1:%(adderPort)d%(adapterEndpoint)s\n  adder2: http://127.0.0.1:%(adderTwoPort)d%(adapterEndpoint)s' ) #NEWLINE# def verify( response ) : #NEWLINE# #INDENT# self . assertEqual ( response , { #NEWLINE# #INDENT# 'Number' : 4 , #NEWLINE# 'SeenByFakeDocker' : 42 , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# d . addCallback ( verify ) #NEWLINE# return self