'Test that when user has not read access to course then permission denied exception should raised.'

def test_not_permitted(self):

    (test_user_client, test_user) = self.create_non_staff_authed_user_client()
    CourseEnrollment.enroll(test_user, self.course.id)
    response = test_user_client.ajax_post(self._url(), data=CERTIFICATE_JSON)
    self.assertEqual(response.status_code, 403)
    self.assertIn('error', response.content)
