'Create data for test.'

def _create_test_data(self, course_module, create_blocks=False, publish=True, block_types=None):

    if create_blocks:
        for block_type in block_types:
            ItemFactory.create(parent_location=self.vertical.location, category=block_type, display_name='{}    Problem'.format(block_type))
        if (not publish):
            self.store.unpublish(self.vertical.location, self.user.id)
    course_module.advanced_modules.extend(block_types)
