'Create a course, add some content and add bookmarks.'

def create_course_with_bookmarks_count(self, count, store_type=ModuleStoreEnum.Type.mongo):

    with self.store.default_store(store_type):
        course = CourseFactory.create()
        with self.store.bulk_operations(course.id):
            blocks = [ItemFactory.create(parent_location=course.location, category='chapter', display_name=unicode(index)) for index in range(count)]
        bookmarks = [BookmarkFactory.create(user=self.user, course_key=course.id, usage_key=block.location, xblock_cache=XBlockCache.create({'display_name': block.display_name, 'usage_key': block.location})) for block in blocks]
    return (course, blocks, bookmarks)
