diff options
| author | jem-odoo <jem@openerp.com> | 2018-10-25 13:45:42 +0000 |
|---|---|---|
| committer | jem-odoo <jem@openerp.com> | 2018-12-04 12:48:19 +0000 |
| commit | 52e2ec2ef99473dff705e4e8dd56a8be37e9ba24 (patch) | |
| tree | 685928def9be46a8e7cdd0819ca4fdd813118e45 /addons/project/tests | |
| parent | 47479401cb3f685788d76abe01d3d2bc21ff11e3 (diff) | |
[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
Diffstat (limited to 'addons/project/tests')
| -rw-r--r-- | addons/project/tests/test_project_flow.py | 12 |
1 files changed, 6 insertions, 6 deletions
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) |
