'Helper method: Uses the REST API to call the \'refresh_children\' handler
of a LibraryContent block'

def _refresh_children(self, lib_content_block, status_code_expected=200):

    if ('user' not in lib_content_block.runtime._services):
        user_service = DjangoXBlockUserService(self.user)
        lib_content_block.runtime._services['user'] = user_service
    handler_url = reverse_usage_url('component_handler', lib_content_block.location, kwargs={'handler': 'refresh_children'})
    response = self.client.ajax_post(handler_url)
    self.assertEqual(response.status_code, status_code_expected)
    return modulestore().get_item(lib_content_block.location)
