'Test to make sure delete_item() works on blocks in a library'

def test_delete_item(self):

    library = LibraryFactory.create(modulestore=self.store)
    lib_key = library.location.library_key
    block = ItemFactory.create(category='html', parent_location=library.location, user_id=self.user_id, publish_item=False, modulestore=self.store)
    library = self.store.get_library(lib_key)
    self.assertEqual(len(library.children), 1)
    self.store.delete_item(block.location, self.user_id)
    library = self.store.get_library(lib_key)
    self.assertEqual(len(library.children), 0)
