'Simulate a callback from the XQueue to the example certificate end-point.'

def _post_to_view(self, cert, download_url=None, error_reason=None):

    header = {'lms_key': cert.access_key}
    body = {'username': cert.uuid}
    if (download_url is not None):
        body['url'] = download_url
    if (error_reason is not None):
        body['error'] = 'error'
        body['error_reason'] = self.ERROR_REASON
    payload = {'xqueue_header': json.dumps(header), 'xqueue_body': json.dumps(body)}
    return self.client.post(self.url, data=payload)
