当前位置: 首页>>代码示例>>Python>>正文


Python RemoteDocumentClient.get_info方法代码示例

本文整理汇总了Python中nxdrive.client.RemoteDocumentClient.get_info方法的典型用法代码示例。如果您正苦于以下问题:Python RemoteDocumentClient.get_info方法的具体用法?Python RemoteDocumentClient.get_info怎么用?Python RemoteDocumentClient.get_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nxdrive.client.RemoteDocumentClient的用法示例。


在下文中一共展示了RemoteDocumentClient.get_info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_local_rename_sync_root_folder

# 需要导入模块: from nxdrive.client import RemoteDocumentClient [as 别名]
# 或者: from nxdrive.client.RemoteDocumentClient import get_info [as 别名]
    def test_local_rename_sync_root_folder(self):
        if sys.platform.startswith('linux'):
            raise SkipTest("WIP in https://jira.nuxeo.com/browse/NXDRIVE-170")
        # Use the Administrator to be able to introspect the container of the
        # test workspace.
        remote_client = RemoteDocumentClient(
            self.nuxeo_url, self.admin_user,
            'nxdrive-test-administrator-device', self.version,
            password=self.password, base_folder=self.workspace)

        folder_1_uid = remote_client.get_info(u'/Original Folder 1').uid

        # Create new clients to be able to introspect the test sync root
        toplevel_local_client = LocalClient(self.local_nxdrive_folder_1)

        toplevel_local_client.rename('/' + self.workspace_title,
            'Renamed Nuxeo Drive Test Workspace')
        self.wait_sync()

        workspace_info = remote_client.get_info(self.workspace)
        self.assertEquals(workspace_info.name,
            u"Renamed Nuxeo Drive Test Workspace")

        folder_1_info = remote_client.get_info(folder_1_uid)
        self.assertEquals(folder_1_info.name, u"Original Folder 1")
        self.assertEquals(folder_1_info.parent_uid, self.workspace)
开发者ID:bdineshssdi,项目名称:nuxeo-drive,代码行数:28,代码来源:test_local_move_and_rename.py

示例2: test_local_rename_sync_root_folder

# 需要导入模块: from nxdrive.client import RemoteDocumentClient [as 别名]
# 或者: from nxdrive.client.RemoteDocumentClient import get_info [as 别名]
    def test_local_rename_sync_root_folder(self):
        # Use the Administrator to be able to introspect the container of the
        # test workspace.
        remote_client = RemoteDocumentClient(
            self.nuxeo_url, self.admin_user,
            'nxdrive-test-administrator-device', self.version,
            password=self.password, base_folder=self.workspace)

        folder_1_uid = remote_client.get_info(u'/Original Folder 1').uid

        # Create new clients to be able to introspect the test sync root
        toplevel_local_client = LocalClient(self.local_nxdrive_folder_1)

        toplevel_local_client.rename('/' + self.workspace_title,
                                     'Renamed Nuxeo Drive Test Workspace')
        self.wait_sync()

        workspace_info = remote_client.get_info(self.workspace)
        self.assertEquals(workspace_info.name,
                          u"Renamed Nuxeo Drive Test Workspace")

        folder_1_info = remote_client.get_info(folder_1_uid)
        self.assertEquals(folder_1_info.name, u"Original Folder 1")
        self.assertEquals(folder_1_info.parent_uid, self.workspace)
        self.assertEqual(len(remote_client.get_children_info(self.workspace_1)), 4)
开发者ID:mkeshava,项目名称:nuxeo-drive,代码行数:27,代码来源:test_local_move_and_rename.py

示例3: test_local_rename_sync_root_folder

# 需要导入模块: from nxdrive.client import RemoteDocumentClient [as 别名]
# 或者: from nxdrive.client.RemoteDocumentClient import get_info [as 别名]
    def test_local_rename_sync_root_folder(self):
        sb, ctl = self.sb_1, self.controller_1
        # Use the Administrator to be able to introspect the container of the
        # test workspace.
        remote_client = RemoteDocumentClient(
            self.nuxeo_url, self.admin_user,
            'nxdrive-test-administrator-device',
            self.password, base_folder=self.workspace)

        folder_1_uid = remote_client.get_info(u'/Original Folder 1').uid

        # Create new clients to be able to introspect the test sync root
        toplevel_local_client = LocalClient(self.local_nxdrive_folder_1)

        toplevel_local_client.rename('/' + self.workspace_title,
            'Renamed Nuxeo Drive Test Workspace')
        self.assertEquals(ctl.synchronizer.update_synchronize_server(sb), 1)

        workspace_info = remote_client.get_info(self.workspace)
        self.assertEquals(workspace_info.name,
            u"Renamed Nuxeo Drive Test Workspace")

        folder_1_info = remote_client.get_info(folder_1_uid)
        self.assertEquals(folder_1_info.name, u"Original Folder 1")
        self.assertEquals(folder_1_info.parent_uid, self.workspace)

    # TODO: implement me once canDelete is checked in the synchronizer
    # def test_local_move_sync_root_folder(self):
    #    pass
开发者ID:nicolas-raoul,项目名称:nuxeo-drive,代码行数:31,代码来源:test_integration_move_and_rename.py


注:本文中的nxdrive.client.RemoteDocumentClient.get_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。