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

def test_task_library_update(self):

    searcher = SearchEngine.get_search_engine(LibrarySearchIndexer.INDEX_NAME)
    library_search_key = unicode(normalize_key_for_search(self.library.location.library_key))
    response = searcher.search(field_dictionary={'library': library_search_key})
    self.assertEqual(response['total'], 0)
    listen_for_library_update(self, self.library.location.library_key)
    response = searcher.search(field_dictionary={'library': library_search_key})
    self.assertEqual(response['total'], 2)
