From 65bd528e7a87f1821a0d47e288493a1f09d9aced Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 11 May 2021 15:06:26 -0400 Subject: [PATCH] added deleted property to submission object --- indico/queries/submission.py | 4 ++++ indico/types/submission.py | 3 ++- tests/integration/queries/test_workflow.py | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/indico/queries/submission.py b/indico/queries/submission.py index 6ed0dbde..edba5061 100644 --- a/indico/queries/submission.py +++ b/indico/queries/submission.py @@ -52,6 +52,7 @@ class ListSubmissions(GraphQLRequest): inputFile inputFilename resultFile + deleted retrieved errors } @@ -110,6 +111,7 @@ class GetSubmission(GraphQLRequest): inputFilename resultFile retrieved + deleted errors } } @@ -149,6 +151,7 @@ class WaitForSubmissions(RequestChain): inputFilename resultFile retrieved + deleted errors } } @@ -207,6 +210,7 @@ class UpdateSubmission(GraphQLRequest): inputFilename resultFile retrieved + deleted errors } } diff --git a/indico/types/submission.py b/indico/types/submission.py index 20aa6cc0..c14eb7ab 100644 --- a/indico/types/submission.py +++ b/indico/types/submission.py @@ -36,8 +36,8 @@ class Submission(BaseType): result_file (str): URL of the result datafile within the Indico Platform retrieved (bool): Whether the submission has been retrieved by a user This flag is set manually by users. + deleted (bool): Whether the submission result has been deleted from the server errors (str): Any errors raised while processing the submission - """ id: int @@ -49,4 +49,5 @@ class Submission(BaseType): input_filename: str result_file: str retrieved: bool + deleted: bool errors: str diff --git a/tests/integration/queries/test_workflow.py b/tests/integration/queries/test_workflow.py index 81cd9ade..44849bac 100644 --- a/tests/integration/queries/test_workflow.py +++ b/tests/integration/queries/test_workflow.py @@ -1,6 +1,7 @@ from indico.queries.workflow import GetWorkflow import pytest from pathlib import Path +import time from indico.client import IndicoClient from indico.errors import IndicoError, IndicoInputError @@ -91,9 +92,12 @@ def test_workflow_submission( assert isinstance(result, dict) assert result["submission_id"] == submission_id assert result["file_version"] == 1 - client.call(UpdateSubmission(submission_id, retrieved=True)) sub = client.call(GetSubmission(submission_id)) assert isinstance(sub, Submission) + assert sub.retrieved is False + assert sub.deleted is False + client.call(UpdateSubmission(submission_id, retrieved=True)) + sub = client.call(GetSubmission(submission_id)) assert sub.retrieved is True