'Ensure when a timeout value is set, the controller respects that value
when making a request.'

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

    self._test_app_healthcheck()
    app = App.objects.all()[0]
    url = u'/v1/apps/{app}/config'.format(**locals())
    body = {u'values': json.dumps({u'HEALTHCHECK_TIMEOUT': 10})}
    self.client.post(url, json.dumps(body), content_type=u'application/json', HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    mock_request.assert_called_with(u'http://127.0.0.1:1234/', timeout=10)
