From ebe4a67837870fed245fab25f2a4c41c68492828 Mon Sep 17 00:00:00 2001 From: DonHaul Date: Mon, 19 Aug 2024 15:33:29 +0200 Subject: [PATCH] workflows: destroy workflows and delete/stop running tasks * ref: cern-sis/issues-inspire#532 --- backoffice/backoffice/workflows/tests/test_views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backoffice/backoffice/workflows/tests/test_views.py b/backoffice/backoffice/workflows/tests/test_views.py index 445c4cba..31d4e499 100644 --- a/backoffice/backoffice/workflows/tests/test_views.py +++ b/backoffice/backoffice/workflows/tests/test_views.py @@ -11,6 +11,7 @@ from django.test import TransactionTestCase from django.urls import reverse from django_opensearch_dsl.registries import registry +from rest_framework import status from rest_framework.test import APIClient from backoffice.workflows import airflow_utils @@ -113,7 +114,7 @@ def test_destroy(self): url = reverse("api:workflows-detail", kwargs={"pk": self.workflow.id}) response = self.api_client.delete(url) - self.assertEqual(response.status_code, 204) + self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) assert ( airflow_utils.find_executed_dags( self.workflow.id, self.workflow.workflow_type