'POST request to given url by given username.
Make sure that POSTing to the given url causes the given username
to perform the given action.  Make the internal rate limiter return
delay and make sure that the WSGI app returns the correct response.'

def _request(self, verb, url, username=None):

    if username:
        request = webob.Request.blank(('/%s' % username))
    else:
        request = webob.Request.blank('/')
    request.method = 'POST'
    request.body = self._request_data(verb, url)
    response = request.get_response(self.app)
    if ('X-Wait-Seconds' in response.headers):
        self.assertEqual(http_client.FORBIDDEN, response.status_int)
        return response.headers['X-Wait-Seconds']
    self.assertEqual(http_client.NO_CONTENT, response.status_int)
