本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)
示例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)