Skip to content

Commit

Permalink
test: Fix unit test & precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Khalid BENTALEB committed Feb 5, 2025
1 parent 9911090 commit 0c72a20
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions project_task_add_very_high/tests/test_uninstall_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@ def test_uninstall_hook(self):
# Call the uninstall hook
uninstall_hook(self.env)

# Refresh the records to get updated values from the database
self.task_high.refresh()
self.task_very_high.refresh()
self.task_normal.refresh()

# Assert that the priorities have been updated correctly
self.assertEqual(self.task_high.priority, "1", "High priority task should be updated to Normal.")
self.assertEqual(self.task_very_high.priority, "1", "Very High priority task should be updated to Normal.")
self.assertEqual(self.task_normal.priority, "1", "Normal priority task should remain unchanged.")
self.assertEqual(
self.task_high.priority,
"1",
"High priority task should be updated to Normal."
)
self.assertEqual(
self.task_very_high.priority,
"1",
"Very High priority task should be updated to Normal."
)
self.assertEqual(
self.task_normal.priority,
"1",
"Normal priority task should remain unchanged."
)

0 comments on commit 0c72a20

Please sign in to comment.