'Making sure that the receiver correctly fires off the task when invoked by signal'

def test_task_indexing_course(self):

    searcher = SearchEngine.get_search_engine(CoursewareSearchIndexer.INDEX_NAME)
    response = searcher.search(doc_type=CoursewareSearchIndexer.DOCUMENT_TYPE, field_dictionary={'course': unicode(self.course.id)})
    self.assertEqual(response['total'], 0)
    listen_for_course_publish(self, self.course.id)
    response = searcher.search(doc_type=CoursewareSearchIndexer.DOCUMENT_TYPE, field_dictionary={'course': unicode(self.course.id)})
    self.assertEqual(response['total'], 3)
