'If the given method name on the underyling ``Docker`` client has a
non-404 error, that gets passed through to ``Docker.list()``.
:param str method_name: Method of a docker ``Client``.
:return: ``Deferred`` firing on test success.'

def error_passthrough_test(self, method_name):

    name = random_name(self)
    client = DockerClient()
    self.addCleanup(client.remove, name)
    d = client.add(name, u'busybox:latest')
    response = make_response(500, 'Simulated    error')
    def error(name):
        raise APIError('', response)
    def added(_):
        self.patch(client._client, method_name, error)
        return client.list()
    d.addCallback(added)
    return self.assertFailure(d, APIError)
