'If a user deploys an app with a config value set for HEALTHCHECK_URL but the app
returns a connection error, the controller should continue checking until either the app
responds or the app fails to respond within the timeout.
NOTE (bacongobbler): the Docker userland proxy listens for connections and returns a
ConnectionError, hence the unit test.'

@mock.patch(u'requests.get', mock_request_connection_error)
@mock.patch(u'time.sleep', (lambda func: func))
def test_app_healthcheck_connection_error(self):

    response = self._test_app_healthcheck()
    self.assertEqual(response.status_code, 503)
    self.assertEqual(response.data, {u'detail': u'aborting,    app    containers    failed    to    respond    to    health    check'})
