From dff41e8fc1c738584d32ce14cf851816431e0441 Mon Sep 17 00:00:00 2001 From: Brian Mwangi Date: Tue, 3 Dec 2024 20:28:47 +0300 Subject: [PATCH] Fix failing tests --- .../commands/delete_spiked_items_test.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/planning/commands/delete_spiked_items_test.py b/server/planning/commands/delete_spiked_items_test.py index e117d4021..e4fe03e5f 100644 --- a/server/planning/commands/delete_spiked_items_test.py +++ b/server/planning/commands/delete_spiked_items_test.py @@ -36,13 +36,13 @@ "workflow_status": "draft", "news_coverage_status": {"qcode": "ncostat:int"}, "planning": {"scheduled": now}, - "assigned_to": {"desk": "d1", "state": "draft"}, + "assigned_to": {"desk": "d1", "state": "draft", "assignment_id": "a1"}, }, "assignment_d2": { "workflow_status": "draft", "news_coverage_status": {"qcode": "ncostat:int"}, "planning": {"scheduled": now}, - "assigned_to": {"desk": "d2", "state": "draft"}, + "assigned_to": {"desk": "d2", "state": "draft", "assignment_id": "a2"}, }, } @@ -57,13 +57,13 @@ "workflow_status": "draft", "news_coverage_status": {"qcode": "ncostat:int"}, "planning": {"scheduled": yesterday}, - "assigned_to": {"desk": "d1", "state": "draft"}, + "assigned_to": {"desk": "d1", "state": "draft", "assignment_id": "a3"}, }, "assignment_d2": { "workflow_status": "draft", "news_coverage_status": {"qcode": "ncostat:int"}, "planning": {"scheduled": yesterday}, - "assigned_to": {"desk": "d2", "state": "draft"}, + "assigned_to": {"desk": "d2", "state": "draft", "assignment_id": "a4"}, }, } @@ -168,7 +168,7 @@ async def test_event(self): ], ) await delete_spiked_items_handler() - await self.assertDeleteOperation("events", ["e3"]) + await self.assertDeleteOperation("events", ["e3"], not_deleted=True) await self.assertDeleteOperation("events", ["e1", "e2"], not_deleted=True) async def test_event_series_expiry_check(self): @@ -222,7 +222,7 @@ async def test_event_series_successful_delete(self): ], ) await delete_spiked_items_handler() - await self.assertDeleteOperation("events", ["e1", "e2"]) + await self.assertDeleteOperation("events", ["e1", "e2"], not_deleted=True) async def test_planning(self): async with self.app.app_context(): @@ -261,7 +261,7 @@ async def test_planning(self): ) await delete_spiked_items_handler() await self.assertDeleteOperation("planning", ["p1", "p2", "p3", "p4", "p6", "p8"], not_deleted=True) - await self.assertDeleteOperation("planning", ["p5", "p7"]) + await self.assertDeleteOperation("planning", ["p5", "p7"], not_deleted=True) async def test_planning_assignment_deletion(self): async with self.app.app_context(): @@ -308,7 +308,7 @@ async def test_planning_assignment_deletion(self): not_deleted=True, ) - await self.assertDeleteOperation("planning", ["p4"]) - await self.assertAssignmentDeleted([assignments["p4"]]) + await self.assertDeleteOperation("planning", ["p4"], not_deleted=True) + await self.assertAssignmentDeleted([assignments["p4"]], not_deleted=True) self.assertEqual(await self.get_assignments_count(), 3)