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


Python HydroShare.resource方法代码示例

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


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

示例1: test_resource_move_or_rename

# 需要导入模块: from hs_restclient import HydroShare [as 别名]
# 或者: from hs_restclient.HydroShare import resource [as 别名]
 def test_resource_move_or_rename(self):
     hs = HydroShare(prompt_auth=False)
     response = hs.resource('511debf8858a4ea081f78d66870da76c').functions.move_or_rename({
         "source_path": "/source/path",
         "target_path": "/target/path"
     })
     self.assertEqual(response.status_code, 200)
开发者ID:hydroshare,项目名称:hs_restclient,代码行数:9,代码来源:test_hs_restclient.py

示例2: test_resource_scimeta_custom

# 需要导入模块: from hs_restclient import HydroShare [as 别名]
# 或者: from hs_restclient.HydroShare import resource [as 别名]
 def test_resource_scimeta_custom(self):
     hs = HydroShare(prompt_auth=False)
     response = hs.resource('511debf8858a4ea081f78d66870da76c').scimeta.custom({
         "foo": "bar",
         "foo2": "bar2"
     })
     self.assertEqual(response.status_code, 200)
开发者ID:hydroshare,项目名称:hs_restclient,代码行数:9,代码来源:test_hs_restclient.py

示例3: test_resource_zip_folder

# 需要导入模块: from hs_restclient import HydroShare [as 别名]
# 或者: from hs_restclient.HydroShare import resource [as 别名]
 def test_resource_zip_folder(self):
     hs = HydroShare(prompt_auth=False)
     response = hs.resource('511debf8858a4ea081f78d66870da76c').functions.zip({
         "input_coll_path": "/source/path",
         "output_zip_fname": "filename.zip",
         "remove_original_after_zip": True
     })
     self.assertEqual(response.status_code, 200)
开发者ID:hydroshare,项目名称:hs_restclient,代码行数:10,代码来源:test_hs_restclient.py

示例4: test_resource_flag_make_not_shareable

# 需要导入模块: from hs_restclient import HydroShare [as 别名]
# 或者: from hs_restclient.HydroShare import resource [as 别名]
 def test_resource_flag_make_not_shareable(self):
     hs = HydroShare(prompt_auth=False)
     response = hs.resource('511debf8858a4ea081f78d66870da76c').flag({
         "t": "make_not_shareable"
     })
     self.assertEqual(response.status_code, 202)
开发者ID:hydroshare,项目名称:hs_restclient,代码行数:8,代码来源:test_hs_restclient.py

示例5: test_set_file_type

# 需要导入模块: from hs_restclient import HydroShare [as 别名]
# 或者: from hs_restclient.HydroShare import resource [as 别名]
 def test_set_file_type(self):
     hs = HydroShare(prompt_auth=False)
     response = hs.resource('511debf8858a4ea081f78d66870da76c').functions.set_file_type(
         {"file_path": "file_path",
          "hs_file_type": "NetCDF"})
     self.assertEqual(response.status_code, 202)
开发者ID:hydroshare,项目名称:hs_restclient,代码行数:8,代码来源:test_hs_restclient.py

示例6: test_resource_copy

# 需要导入模块: from hs_restclient import HydroShare [as 别名]
# 或者: from hs_restclient.HydroShare import resource [as 别名]
 def test_resource_copy(self):
     hs = HydroShare(prompt_auth=False)
     response = hs.resource('511debf8858a4ea081f78d66870da76c').version()
     self.assertNotEqual('6dbb0dfb8f3a498881e4de428cb1587c', response)
     self.assertEqual(response.status_code, 202)
开发者ID:hydroshare,项目名称:hs_restclient,代码行数:7,代码来源:test_hs_restclient.py


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