diff --git a/server/planning/commands/delete_spiked_items_test.py b/server/planning/commands/delete_spiked_items_test.py index df9999e4c..8307d0ef1 100644 --- a/server/planning/commands/delete_spiked_items_test.py +++ b/server/planning/commands/delete_spiked_items_test.py @@ -71,6 +71,7 @@ class DeleteSpikedItemsTest(TestCase): async def asyncSetUp(self): await super().asyncSetUp() + self.app_config.update({"MODULES": ["planning.module"]}) # Expire items that are scheduled more than 24 hours from now self.app.config.update({"PLANNING_DELETE_SPIKED_MINUTES": 1440}) @@ -99,7 +100,7 @@ async def assertAssignmentDeleted(self, assignment_ids, not_deleted=False): async def insert(self, item_type, items): service = self.event_service if item_type == "events" else self.planning_service - await service.create(items) + await service.post(items) async def get_assignments_count(self): return await self.assignment_service.find({"_id": {"$exists": 1}}).count() diff --git a/server/planning/tests/__init__.py b/server/planning/tests/__init__.py index 1c153f0d1..8d785edfc 100644 --- a/server/planning/tests/__init__.py +++ b/server/planning/tests/__init__.py @@ -5,6 +5,6 @@ class TestCase(_TestCase): test_context = None # avoid using test_request_context def setUp(self): - config = {"INSTALLED_APPS": ["planning"], "MODULES": ["planning.module"]} + config = {"INSTALLED_APPS": ["planning"]} update_config(config) super().setUp()