From 52e2ec2ef99473dff705e4e8dd56a8be37e9ba24 Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Thu, 25 Oct 2018 13:45:42 +0000 Subject: [IMP] project: make project use rating parent mixin No functionnal changes are done in this commit. Everything stays the same, but use the parent mixin mecanism. Task-1903565 --- addons/project/tests/test_project_flow.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'addons/project/tests/test_project_flow.py') diff --git a/addons/project/tests/test_project_flow.py b/addons/project/tests/test_project_flow.py index 2735b07d1c2..32058a55f82 100644 --- a/addons/project/tests/test_project_flow.py +++ b/addons/project/tests/test_project_flow.py @@ -165,8 +165,8 @@ class TestProjectFlow(TestProjectBase): self.assertEqual(first_task.rating_count, 1, "Task should have only one rating associated, since one is not consumed") self.assertEqual(rating_good.parent_res_id, self.project_pigs.id) - self.assertEqual(self.project_goats.percentage_satisfaction_task, -1) - self.assertEqual(self.project_pigs.percentage_satisfaction_task, -1) + self.assertEqual(self.project_goats.rating_percentage_satisfaction, -1) + self.assertEqual(self.project_pigs.rating_percentage_satisfaction, 0) # There is a rating but not a "great" on, just an "okay". # Consuming rating_good first_task.rating_apply(10, rating_good.access_token) @@ -177,8 +177,8 @@ class TestProjectFlow(TestProjectBase): self.assertEqual(first_task.rating_count, 2, "Task should have two ratings associated with it") self.assertEqual(rating_good.parent_res_id, self.project_pigs.id) - self.assertEqual(self.project_goats.percentage_satisfaction_task, -1) - self.assertEqual(self.project_pigs.percentage_satisfaction_task, 50) + self.assertEqual(self.project_goats.rating_percentage_satisfaction, -1) + self.assertEqual(self.project_pigs.rating_percentage_satisfaction, 50) # We change the task from project_pigs to project_goats, ratings should be associated with the new project first_task.project_id = self.project_goats.id @@ -188,5 +188,5 @@ class TestProjectFlow(TestProjectBase): first_task.invalidate_cache() self.assertEqual(rating_good.parent_res_id, self.project_goats.id) - self.assertEqual(self.project_goats.percentage_satisfaction_task, 50) - self.assertEqual(self.project_pigs.percentage_satisfaction_task, -1) + self.assertEqual(self.project_goats.rating_percentage_satisfaction, 50) + self.assertEqual(self.project_pigs.rating_percentage_satisfaction, -1) -- cgit v1.2.3