本文整理匯總了Python中sevenbridges.meta.transformer.Transform.to_task方法的典型用法代碼示例。如果您正苦於以下問題:Python Transform.to_task方法的具體用法?Python Transform.to_task怎麽用?Python Transform.to_task使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sevenbridges.meta.transformer.Transform
的用法示例。
在下文中一共展示了Transform.to_task方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: query
# 需要導入模塊: from sevenbridges.meta.transformer import Transform [as 別名]
# 或者: from sevenbridges.meta.transformer.Transform import to_task [as 別名]
def query(cls, project=None, status=None, batch=None,
parent=None, offset=None, limit=None, api=None):
"""
Query (List) tasks
:param project: Target project. optional.
:param status: Task status.
:param batch: Only batch tasks.
:param parent: Parent batch task identifier.
:param offset: Pagination offset.
:param limit: Pagination limit.
:param api: Api instance.
:return: Collection object.
"""
api = api or cls._API
if parent:
parent = Transform.to_task(parent)
return super(Task, cls)._query(url=cls._URL['query'], project=project,
status=status, batch=batch,
parent=parent, offset=offset,
limit=limit, api=api)
示例2: test_transform_task_invalid_values
# 需要導入模塊: from sevenbridges.meta.transformer import Transform [as 別名]
# 或者: from sevenbridges.meta.transformer.Transform import to_task [as 別名]
def test_transform_task_invalid_values(task):
with pytest.raises(SbgError):
Transform.to_task(task)
示例3: test_transform_app_invalid_values
# 需要導入模塊: from sevenbridges.meta.transformer import Transform [as 別名]
# 或者: from sevenbridges.meta.transformer.Transform import to_task [as 別名]
def test_transform_app_invalid_values(app):
with pytest.raises(SbgError):
Transform.to_task(app)
示例4: test_transform_task
# 需要導入模塊: from sevenbridges.meta.transformer import Transform [as 別名]
# 或者: from sevenbridges.meta.transformer.Transform import to_task [as 別名]
def test_transform_task(task):
Transform.to_task(task)