'Verify that course gets reindexed.'

def test_reindex_course(self):

    index_url = reverse_course_url('course_search_index_handler', self.course.id)
    response = self.client.get(index_url, {}, HTTP_ACCEPT='application/json')
    self.assertIn(self.SUCCESSFUL_RESPONSE, response.content)
    self.assertEqual(response.status_code, 200)
    response = self.client.post(index_url, {}, HTTP_ACCEPT='application/json')
    self.assertEqual(response.content, '')
    self.assertEqual(response.status_code, 405)
    self.client.logout()
    response = self.client.get(index_url, {}, HTTP_ACCEPT='application/json')
    self.assertEqual(response.status_code, 302)
