'Verify that the view returns HTTP status 403 and includes a URL in the response, and no enrollment is created.'

def assert_access_denied(self, user_message_path):

    data = self._generate_data()
    response = self.client.post(self.url, data, content_type='application/json')
    self.assertEqual(response.status_code, 403)
    resp_data = json.loads(response.content)
    user_message_url = get_absolute_url(user_message_path)
    self.assertEqual(resp_data['user_message_url'], user_message_url)
    self.assertEqual(self._get_enrollments(), [])
