Skip to content

Commit b8eeaaf

Browse files
committed
Add status field in the API RunSerializer #203
1 parent 4fbdb4c commit b8eeaaf

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

scanpipe/api/serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class Meta:
7373
fields = [
7474
"url",
7575
"pipeline_name",
76+
"status",
7677
"description",
7778
"project",
7879
"uuid",

scanpipe/tests/test_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from scanpipe.models import DiscoveredPackage
4545
from scanpipe.models import Project
4646
from scanpipe.models import ProjectError
47+
from scanpipe.models import Run
4748
from scanpipe.pipes.input import copy_input
4849
from scanpipe.pipes.output import JSONResultsGenerator
4950
from scanpipe.tests import package_data1
@@ -346,6 +347,7 @@ def test_scanpipe_api_run_detail(self):
346347
self.assertIsNone(response.data["task_end_date"])
347348
self.assertEqual("", response.data["task_output"])
348349
self.assertIsNone(response.data["execution_time"])
350+
self.assertEqual(Run.Status.NOT_STARTED, response.data["status"])
349351

350352
@mock.patch("scanpipe.models.Run.execute_task_async")
351353
def test_scanpipe_api_run_action_start_pipeline(self, mock_execute_task):

0 commit comments

Comments
 (0)