Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMwangi21 committed Dec 3, 2024
1 parent c7a4bcf commit dff41e8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server/planning/commands/delete_spiked_items_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
}

Expand All @@ -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"},
},
}

Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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)

0 comments on commit dff41e8

Please sign in to comment.