本文整理汇总了Python中pyuploadcare.api_resources.FileGroup.store方法的典型用法代码示例。如果您正苦于以下问题:Python FileGroup.store方法的具体用法?Python FileGroup.store怎么用?Python FileGroup.store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyuploadcare.api_resources.FileGroup
的用法示例。
在下文中一共展示了FileGroup.store方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_do_not_store_twice
# 需要导入模块: from pyuploadcare.api_resources import FileGroup [as 别名]
# 或者: from pyuploadcare.api_resources.FileGroup import store [as 别名]
def test_do_not_store_twice(self, request):
group = FileGroup(cdn_url_or_group_id="0513dda0-582f-447d-846f-096e5df9e2bb~2")
# GET /api/groups/{group_id}/
request.return_value = MockResponse(status=200, data=b'{"datetime_stored": "2013-04-03T12:01:28.714Z"}')
group.store()
group.store()
self.assertEqual(request.call_count, 1)
示例2: test_successful_store
# 需要导入模块: from pyuploadcare.api_resources import FileGroup [as 别名]
# 或者: from pyuploadcare.api_resources.FileGroup import store [as 别名]
def test_successful_store(self, request):
group = FileGroup(cdn_url_or_group_id="0513dda0-582f-447d-846f-096e5df9e2bb~2")
group._info_cache = {"datetime_stored": None}
# PUT /api/groups/{group_id}/storage/
request.return_value = MockResponse(status=200, data=b'{"datetime_stored": "2013-04-03T12:01:28.714Z"}')
group.store()
self.assertEqual(request.call_count, 1)