Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMwangi21 committed Nov 28, 2024
1 parent 5b82274 commit 7d1f4e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/planning/commands/delete_spiked_items_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion server/planning/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 7d1f4e6

Please sign in to comment.