'Perform a cross-domain POST request.'

def _cross_domain_post(self, csrf_cookie):

    url = reverse('courseenrollments')
    params = json.dumps({'course_details': {'course_id': unicode(self.course.id)}, 'user': self.user.username})
    return self.client.post(url, params, content_type='application/json', HTTP_REFERER=self.REFERER, HTTP_X_CSRFTOKEN=csrf_cookie)
