@capture_logging(None)
    def test_open_port_errors_as_errbacks(self, logger):
        fake_network = make_memory_network()
        fake_network.open_port = lambda port: 1/0

        api = ApplicationNodeDeployer(
            u'example.com', docker_client=FakeDockerClient(),
            network=fake_network)

        d = OpenPorts(ports=[OpenPort(port=3306)]).run(
            api, state_persister=InMemoryStatePersister())
        exception = self.failureResultOf(d, FirstError)
        self.assertIsInstance(
            exception.value.subFailure.value,
            ZeroDivisionError
        )
        logger.flush_tracebacks(ZeroDivisionError)
Exceptions raised in `open_port` operations are reported as
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/test/test_container.py/OpenPortsTests.test_open_port_errors_as_errbacks