#NEWLINE# @ capture_logging ( None ) #NEWLINE# def test_delete_proxy_errors_as_errbacks( self , logger ) : #NEWLINE# #INDENT# '\n        Exceptions raised in `delete_proxy` operations are reported as\n        failures in the returned deferred.\n        ' #NEWLINE# fake_network = make_memory_network ( ) #NEWLINE# fake_network . create_proxy_to ( ip = '192.0.2.100' , port = 3306 ) #NEWLINE# fake_network . delete_proxy = ( lambda proxy : ( 1 / 0 ) ) #NEWLINE# api = ApplicationNodeDeployer ( 'example.com' , docker_client = FakeDockerClient ( ) , network = fake_network ) #NEWLINE# d = SetProxies ( ports = [ ] ) . run ( api , state_persister = InMemoryStatePersister ( ) ) #NEWLINE# exception = self . failureResultOf ( fake_network , FirstError ) #NEWLINE# self . assertIsInstance ( exception . value . subFailure . value , ZeroDivisionError ) #NEWLINE# logger . flush_tracebacks ( ZeroDivisionError )