def test_hydrate_workflow_template__branch_node(): workflow_template = _core_workflow_pb2.WorkflowTemplate() branch_node = _core_workflow_pb2.Node( id="branch_node", branch_node=_core_workflow_pb2.BranchNode( if_else=_core_workflow_pb2.IfElseBlock( case=_core_workflow_pb2.IfBlock( then_node=_core_workflow_pb2.Node( task_node=_core_workflow_pb2.TaskNode( reference_id=_identifier_pb2.Identifier( resource_type=_identifier_pb2.TASK, name="if_case"), ), )), else_node=_core_workflow_pb2.Node( task_node=_core_workflow_pb2.TaskNode( reference_id=_identifier_pb2.Identifier( resource_type=_identifier_pb2.TASK, name="else_node"), ), ), ), ), )
def to_flyte_idl(self): """ :rtype: flyteidl.core.workflow_pb2.BranchNode """ return _core_workflow.BranchNode(if_else=self.if_else.to_flyte_idl())