示例#1
0
def test_operation_from_resource_id(client):
    responses.add(responses.GET,
                  full_url(client, "operations/1"),
                  json=op_1_json)

    op1 = Operation.from_resource_id(client, "1")

    assert op1.resource_id == "1"
    assert op1.succeeded
示例#2
0
def from_resource_id(tamr: Client, *, job_id: Union[int, str]) -> Operation:
    """Create an operation from a job id

    Args:
        tamr: A Tamr client
        job_id: A job ID

    Returns:
        A Tamr operation
    """
    return Operation.from_resource_id(tamr, str(job_id))