'Helper method that gets an item with the specified category from the
modulestore and verifies that it has the expected descriptor name.
Returns the item\'s usage_id.'

def _verify_descriptor(self, category, course, descriptor, item_id=None):

    if (not item_id):
        item = ItemFactory(category=category, parent=course)
        item_id = item.scope_ids.usage_id
    item = self.store.get_item(item_id)
    self.assertEqual(item.__class__.__name__, descriptor)
    return item_id
