From 833bc1e679eff7f5fdad0bb90d809b54565d59f6 Mon Sep 17 00:00:00 2001 From: DonHaul Date: Mon, 26 Aug 2024 18:08:36 +0200 Subject: [PATCH] backoffice: decision added to search api * ref: cern-sis/issues-inspire/issues/555 --- backoffice/backoffice/workflows/tests/test_views.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backoffice/backoffice/workflows/tests/test_views.py b/backoffice/backoffice/workflows/tests/test_views.py index 319d6c94..b80d8ce7 100644 --- a/backoffice/backoffice/workflows/tests/test_views.py +++ b/backoffice/backoffice/workflows/tests/test_views.py @@ -133,7 +133,7 @@ def test_delete(self): class TestWorkflowSearchViewSet(BaseTransactionTestCase): - endpoint = "/api/workflows/search/" + endpoint = reverse("search:workflow-list") reset_sequences = True fixtures = ["backoffice/fixtures/groups.json"] @@ -169,6 +169,12 @@ def test_list_anonymous(self): self.assertEqual(response.status_code, 403) + def test_contains_decisions(self): + self.api_client.force_authenticate(user=self.admin) + + response = self.api_client.get(self.endpoint) + self.assertIn("decisions", response.json()["results"][0]) + class TestAuthorWorkflowPartialUpdateViewSet(BaseTransactionTestCase): endpoint_base_url = "/api/workflow-update"