'Test that course will also be delete from search_index after course deletion.'

def _test_delete_course_from_search_index_after_course_deletion(self, store):

    self.DOCUMENT_TYPE = 'course_info'
    response = self.search()
    self.assertEqual(response['total'], 0)
    self.reindex_course(store)
    response = self.search()
    self.assertEqual(response['total'], 1)
    modulestore().delete_course(self.course.id, self.user_id)
    self.assertIsNone(modulestore().get_course(self.course.id))
    response = self.search()
    self.assertEqual(response['total'], 0)
