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 0c72a20 commit 988f80c
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions project_task_add_very_high/tests/test_uninstall_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ def setUp(self):
super(TestUninstallHook, self).setUp()
# Create some sample tasks with different priorities

self.task_normal = self.env["project.task"].create({
"name": "Task with Normal Priority",
"priority": "1", # Normal priority
})
self.task_high = self.env["project.task"].create({
"name": "Task with High Priority",
"priority": "2", # High priority
})
self.task_very_high = self.env["project.task"].create({
"name": "Task with Very High Priority",
"priority": "3", # Very High priority
})
self.task_normal = self.env["project.task"].create(
{
"name": "Task with Normal Priority",
"priority": "1", # Normal priority
}
)
self.task_high = self.env["project.task"].create(
{
"name": "Task with High Priority",
"priority": "2", # High priority
}
)
self.task_very_high = self.env["project.task"].create(
{
"name": "Task with Very High Priority",
"priority": "3", # Very High priority
}
)

def test_uninstall_hook(self):
"""
Expand All @@ -35,15 +41,15 @@ def test_uninstall_hook(self):
self.assertEqual(
self.task_high.priority,
"1",
"High priority task should be updated to Normal."
"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."
"Very High priority task should be updated to Normal.",
)
self.assertEqual(
self.task_normal.priority,
"1",
"Normal priority task should remain unchanged."
"Normal priority task should remain unchanged.",
)

0 comments on commit 988f80c

Please sign in to comment.