'Test the error conditions for the access'

def test_negative_conditions(self):

    index_url = reverse_course_url('course_search_index_handler', self.course.id)
    (non_staff_client, _) = self.create_non_staff_authed_user_client()
    response = non_staff_client.get(index_url, {}, HTTP_ACCEPT='application/json')
    self.assertEqual(response.status_code, 403)
