diff --git a/addons/crm/tests/common.py b/addons/crm/tests/common.py index 9b461b41b0fa9d246d25fcd5136760c3818b9659..96496ab071c196aa296afe7637d2d2d2b8661aff 100644 --- a/addons/crm/tests/common.py +++ b/addons/crm/tests/common.py @@ -4,11 +4,11 @@ from odoo.tests.common import SavepointCase -class TestCrmCases(SavepointCase): +class TestCrmCommon(SavepointCase): @classmethod def setUpClass(cls): - super(TestCrmCases, cls).setUpClass() + super(TestCrmCommon, cls).setUpClass() # Create a user as 'Crm Salesmanager' and added the `sales manager` group cls.crm_salemanager = cls.env['res.users'].create({ diff --git a/addons/crm/tests/test_crm_activity.py b/addons/crm/tests/test_crm_activity.py index e780de622a9aeede01f415fcf2e342c363d7f724..737c8d643a59b9d11657ad2df85ad173d6e31b2c 100644 --- a/addons/crm/tests/test_crm_activity.py +++ b/addons/crm/tests/test_crm_activity.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from .common import TestCrmCases +from .common import TestCrmCommon from odoo import fields from datetime import datetime, timedelta -class TestCrmMailActivity(TestCrmCases): +class TestCrmMailActivity(TestCrmCommon): @classmethod def setUpClass(cls): diff --git a/addons/crm/tests/test_crm_lead.py b/addons/crm/tests/test_crm_lead.py index 7a5e0ba83aaa5d83437e5d4c646de9aa96662477..f459ec9fbf0cf5c55b15ebe13ff286a98e313398 100644 --- a/addons/crm/tests/test_crm_lead.py +++ b/addons/crm/tests/test_crm_lead.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from .common import TestCrmCases +from .common import TestCrmCommon from odoo.modules.module import get_module_resource -class TestCRMLead(TestCrmCases): +class TestCRMLead(TestCrmCommon): def test_crm_lead_cancel(self): # I set a new sales team giving access rights of salesman. diff --git a/addons/crm/tests/test_lead2opportunity.py b/addons/crm/tests/test_lead2opportunity.py index 752b215475f81e117ee69b8aa7c17a3d2c7a1a0d..03d684522e09bdec4339c5bfe1ceb992cfe86f2c 100644 --- a/addons/crm/tests/test_lead2opportunity.py +++ b/addons/crm/tests/test_lead2opportunity.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from .common import TestCrmCases +from .common import TestCrmCommon -class TestLead2opportunity2win(TestCrmCases): +class TestLead2opportunity2win(TestCrmCommon): def test_lead2opportunity2win(self): """ Tests for Test Lead 2 opportunity 2 win """ diff --git a/addons/crm/tests/test_new_lead_notification.py b/addons/crm/tests/test_new_lead_notification.py index 932ee751efc3b7eff17eaf3a3c25760c4a9c141b..a52cac2c3f723758940cae7b68feb7ade70fd169 100644 --- a/addons/crm/tests/test_new_lead_notification.py +++ b/addons/crm/tests/test_new_lead_notification.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from .common import TestCrmCases +from .common import TestCrmCommon -class NewLeadNotification(TestCrmCases): +class NewLeadNotification(TestCrmCommon): def test_new_lead_notification(self): """ Test newly create leads like from the website. People and channels diff --git a/addons/hr_holidays/tests/common.py b/addons/hr_holidays/tests/common.py index 018e4971be77ff39b4a4fa204727ecc42de7e81e..9b6d852d634e0468f91ccd4fbd07e650da3235dd 100644 --- a/addons/hr_holidays/tests/common.py +++ b/addons/hr_holidays/tests/common.py @@ -5,10 +5,10 @@ from odoo.addons.test_mail.tests.common import mail_new_test_user from odoo.tests import common -class TestHrHolidaysBase(common.TransactionCase): +class TestHrHolidaysCommon(common.TransactionCase): def setUp(self): - super(TestHrHolidaysBase, self).setUp() + super(TestHrHolidaysCommon, self).setUp() self.env.user.tz = 'Europe/Brussels' # Test users to use through the various tests diff --git a/addons/hr_holidays/tests/test_access_rights.py b/addons/hr_holidays/tests/test_access_rights.py index 0bc2caf4961fe9e65144afd19c7af6045e26f8c4..94bf1c9beca52fd53b5cc327ffb4e0534b5b239c 100644 --- a/addons/hr_holidays/tests/test_access_rights.py +++ b/addons/hr_holidays/tests/test_access_rights.py @@ -5,15 +5,15 @@ from datetime import datetime from dateutil.relativedelta import relativedelta from odoo import tests -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon from odoo.exceptions import AccessError, UserError from odoo.tools import mute_logger @tests.tagged('access_rights', 'post_install', '-at_install') -class TestLeavesRights(TestHrHolidaysBase): +class TestHrHolidaysAccessRightsCommon(TestHrHolidaysCommon): def setUp(self): - super(TestLeavesRights, self).setUp() + super(TestHrHolidaysAccessRightsCommon, self).setUp() self.leave_type = self.env['hr.leave.type'].create({ 'name': 'Unlimited', 'validation_type': 'hr', @@ -84,7 +84,7 @@ class TestLeavesRights(TestHrHolidaysBase): @tests.tagged('access_rights', 'access_rights_states') -class TestAcessRightsStates(TestLeavesRights): +class TestAcessRightsStates(TestHrHolidaysAccessRightsCommon): # ****************************************************** # Action draft # ****************************************************** @@ -377,7 +377,7 @@ class TestAcessRightsStates(TestLeavesRights): leave.with_user(self.user_hrmanager.id).action_draft() @tests.tagged('access_rights', 'access_rights_create') -class TestAccessRightsCreate(TestLeavesRights): +class TestAccessRightsCreate(TestHrHolidaysAccessRightsCommon): @mute_logger('odoo.models.unlink', 'odoo.addons.mail.models.mail_mail') def test_base_user_create_self(self): """ A simple user can create a leave for himself """ @@ -519,7 +519,7 @@ class TestAccessRightsCreate(TestLeavesRights): @tests.tagged('access_rights', 'access_rights_read') -class TestAccessRightsRead(TestLeavesRights): +class TestAccessRightsRead(TestHrHolidaysAccessRightsCommon): # base.group_user @mute_logger('odoo.models.unlink', 'odoo.addons.mail.models.mail_mail') @@ -566,7 +566,7 @@ class TestAccessRightsRead(TestLeavesRights): @tests.tagged('access_rights', 'access_rights_write') -class TestAccessRightsWrite(TestLeavesRights): +class TestAccessRightsWrite(TestHrHolidaysAccessRightsCommon): # base.group_user @mute_logger('odoo.models.unlink', 'odoo.addons.mail.models.mail_mail') @@ -770,7 +770,7 @@ class TestAccessRightsWrite(TestLeavesRights): # TODO Can always cancel with great powers comes great responbilities -class TestMultiCompany(TestHrHolidaysBase): +class TestMultiCompany(TestHrHolidaysCommon): def setUp(self): super(TestMultiCompany, self).setUp() diff --git a/addons/hr_holidays/tests/test_accrual_allocations.py b/addons/hr_holidays/tests/test_accrual_allocations.py index 89e19437dcddaf03a4328875e22c1107f1bf674b..b46da059470472820f79690c6647b8420eae62d6 100644 --- a/addons/hr_holidays/tests/test_accrual_allocations.py +++ b/addons/hr_holidays/tests/test_accrual_allocations.py @@ -7,10 +7,10 @@ from odoo import fields from odoo.tools import mute_logger -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon -class TestAccrualAllocations(TestHrHolidaysBase): +class TestAccrualAllocations(TestHrHolidaysCommon): def setUp(self): super(TestAccrualAllocations, self).setUp() diff --git a/addons/hr_holidays/tests/test_automatic_leave_dates.py b/addons/hr_holidays/tests/test_automatic_leave_dates.py index cacb1975b7dd5b0909c49ff7d80329d018745d4e..d3f76ee547d31510620abf172db356bee155d214 100644 --- a/addons/hr_holidays/tests/test_automatic_leave_dates.py +++ b/addons/hr_holidays/tests/test_automatic_leave_dates.py @@ -3,11 +3,11 @@ from datetime import date, datetime from odoo.tests.common import Form, tagged -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon @tagged('prout') -class TestAutomaticLeaveDates(TestHrHolidaysBase): +class TestAutomaticLeaveDates(TestHrHolidaysCommon): def setUp(self): super(TestAutomaticLeaveDates, self).setUp() diff --git a/addons/hr_holidays/tests/test_change_department.py b/addons/hr_holidays/tests/test_change_department.py index cf041d997580ab0db8fd01d2b02386babaed2fc8..7698d920a65e8e92249f21ee6f2969e96be72369 100644 --- a/addons/hr_holidays/tests/test_change_department.py +++ b/addons/hr_holidays/tests/test_change_department.py @@ -4,10 +4,10 @@ from datetime import datetime from dateutil.relativedelta import relativedelta -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon -class TestChangeDepartment(TestHrHolidaysBase): +class TestChangeDepartment(TestHrHolidaysCommon): def test_employee_change_department_request_change_department(self): self.HolidaysEmployeeGroup = self.env['hr.leave'].with_user(self.user_employee_id) diff --git a/addons/hr_holidays/tests/test_holidays_flow.py b/addons/hr_holidays/tests/test_holidays_flow.py index 2096e3998d42a074a09a715c84aa69de926dc0d9..61f18e5afd95e3b8cb77d611bcf624de27298bb0 100644 --- a/addons/hr_holidays/tests/test_holidays_flow.py +++ b/addons/hr_holidays/tests/test_holidays_flow.py @@ -10,10 +10,10 @@ from odoo import fields from odoo.exceptions import AccessError, ValidationError, UserError from odoo.tools import mute_logger, test_reports -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon -class TestHolidaysFlow(TestHrHolidaysBase): +class TestHolidaysFlow(TestHrHolidaysCommon): @mute_logger('odoo.addons.base.models.ir_model', 'odoo.models') def test_00_leave_request_flow_unlimited(self): diff --git a/addons/hr_holidays/tests/test_hr_leave_type.py b/addons/hr_holidays/tests/test_hr_leave_type.py index 65c648e6d366cc147967ee4ea556ef03ac359075..852603a2d067b4bddbbcbda77fcd52e3c9cf7713 100644 --- a/addons/hr_holidays/tests/test_hr_leave_type.py +++ b/addons/hr_holidays/tests/test_hr_leave_type.py @@ -6,10 +6,10 @@ from dateutil.relativedelta import relativedelta from odoo.exceptions import AccessError -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon -class TestHrLeaveType(TestHrHolidaysBase): +class TestHrLeaveType(TestHrHolidaysCommon): def test_time_type(self): leave_type = self.env['hr.leave.type'].create({ diff --git a/addons/hr_holidays/tests/test_leave_requests.py b/addons/hr_holidays/tests/test_leave_requests.py index 53dc0073d26e39ed00a90c0f4f396b6be507af7a..e3f4c2acb4c8d1bc5677a814e94b92dad98ce65f 100644 --- a/addons/hr_holidays/tests/test_leave_requests.py +++ b/addons/hr_holidays/tests/test_leave_requests.py @@ -8,9 +8,9 @@ from odoo.exceptions import ValidationError from odoo.tools import mute_logger from odoo.tests.common import Form -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon -class TestLeaveRequests(TestHrHolidaysBase): +class TestLeaveRequests(TestHrHolidaysCommon): def _check_holidays_status(self, holiday_status, ml, lt, rl, vrl): self.assertEqual(holiday_status.max_leaves, ml, diff --git a/addons/hr_holidays/tests/test_out_of_office.py b/addons/hr_holidays/tests/test_out_of_office.py index 86e3f95063cad3b305c7c47dcd89994986f2f512..a035f5afbe20d70e84c743c97948724fcbf38b11 100644 --- a/addons/hr_holidays/tests/test_out_of_office.py +++ b/addons/hr_holidays/tests/test_out_of_office.py @@ -6,11 +6,11 @@ from dateutil.relativedelta import relativedelta from odoo.addons.base.tests.common import TransactionCaseWithUserDemo from odoo.tests.common import tagged, users, warmup, Form -from odoo.addons.hr_holidays.tests.common import TestHrHolidaysBase +from odoo.addons.hr_holidays.tests.common import TestHrHolidaysCommon @tagged('out_of_office') -class TestOutOfOffice(TestHrHolidaysBase): +class TestOutOfOffice(TestHrHolidaysCommon): def setUp(self): super().setUp() @@ -55,7 +55,7 @@ class TestOutOfOffice(TestHrHolidaysBase): self.assertEqual(infos[0]['direct_partner'][0]['out_of_office_date_end'], leave_date_end) @tagged('out_of_office') -class TestOutOfOfficePerformance(TestHrHolidaysBase, TransactionCaseWithUserDemo): +class TestOutOfOfficePerformance(TestHrHolidaysCommon, TransactionCaseWithUserDemo): def setUp(self): super(TestOutOfOfficePerformance, self).setUp() diff --git a/addons/product/tests/test_product_attribute_value_config.py b/addons/product/tests/test_product_attribute_value_config.py index 4c7f34e1d1db88854a80fb305b4c0ce1b433cfc1..12d27b59c6f34c18527d0fa7f708c881a5be81c9 100644 --- a/addons/product/tests/test_product_attribute_value_config.py +++ b/addons/product/tests/test_product_attribute_value_config.py @@ -10,10 +10,10 @@ from odoo.tests.common import SavepointCase from odoo.tools import mute_logger -class TestProductAttributeValueSetup(SavepointCase): +class TestProductAttributeValueCommon(SavepointCase): @classmethod def setUpClass(cls): - super(TestProductAttributeValueSetup, cls).setUpClass() + super(TestProductAttributeValueCommon, cls).setUpClass() cls.computer = cls.env['product.template'].create({ 'name': 'Super Computer', @@ -178,7 +178,7 @@ class TestProductAttributeValueSetup(SavepointCase): @tagged('post_install', '-at_install') -class TestProductAttributeValueConfig(TestProductAttributeValueSetup): +class TestProductAttributeValueConfig(TestProductAttributeValueCommon): def test_product_template_attribute_values_creation(self): self.assertEqual(len(self.computer_ssd_attribute_lines.product_template_value_ids), 2, diff --git a/addons/project/tests/test_access_rights.py b/addons/project/tests/test_access_rights.py index 5436490a395c55348406147279203fae71fb66b3..a6e0ac0494f7f1bdd82802cd85253a7f0a134dba 100644 --- a/addons/project/tests/test_access_rights.py +++ b/addons/project/tests/test_access_rights.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.project.tests.test_project_base import TestProjectBase +from odoo.addons.project.tests.test_project_base import TestProjectCommon from odoo.exceptions import AccessError from odoo.tools import mute_logger -class TestPortalProjectBase(TestProjectBase): +class TestProjectPortalCommon(TestProjectCommon): def setUp(self): - super(TestPortalProjectBase, self).setUp() + super(TestProjectPortalCommon, self).setUp() self.user_noone = self.env['res.users'].with_context({'no_reset_password': True, 'mail_create_nosubscribe': True}).create({ 'name': 'Noemie NoOne', 'login': 'noemie', @@ -28,7 +28,7 @@ class TestPortalProjectBase(TestProjectBase): 'name': 'Test5', 'user_id': False, 'project_id': self.project_pigs.id}) -class TestPortalProject(TestPortalProjectBase): +class TestPortalProject(TestProjectPortalCommon): @mute_logger('odoo.addons.base.models.ir_model') def test_employee_project_access_rights(self): diff --git a/addons/project/tests/test_portal.py b/addons/project/tests/test_portal.py index 572297bc25e259627580c315e282406ccabd6e04..5ae9bda4bb3738d8e8ec24712ee03689a3b26228 100644 --- a/addons/project/tests/test_portal.py +++ b/addons/project/tests/test_portal.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.project.tests.test_access_rights import TestPortalProjectBase +from odoo.addons.project.tests.test_access_rights import TestProjectPortalCommon from odoo.exceptions import AccessError from odoo.tools import mute_logger -class TestPortalProject(TestPortalProjectBase): +class TestPortalProject(TestProjectPortalCommon): @mute_logger('odoo.addons.base.models.ir_model') def test_portal_project_access_rights(self): pigs = self.project_pigs diff --git a/addons/project/tests/test_project_base.py b/addons/project/tests/test_project_base.py index 795834e73c1e8fc6306ec1ad60a4f05eca1cc1c0..c38f72561a2c8c5efe8b48b0e256b3728f3769ae 100644 --- a/addons/project/tests/test_project_base.py +++ b/addons/project/tests/test_project_base.py @@ -3,11 +3,11 @@ from odoo.tests.common import SavepointCase from odoo.exceptions import UserError -class TestProjectBase(SavepointCase): +class TestProjectCommon(SavepointCase): @classmethod def setUpClass(cls): - super(TestProjectBase, cls).setUpClass() + super(TestProjectCommon, cls).setUpClass() user_group_employee = cls.env.ref('base.group_user') user_group_project_user = cls.env.ref('project.group_project_user') diff --git a/addons/project/tests/test_project_flow.py b/addons/project/tests/test_project_flow.py index 84f42cfdbcda6655df73748d3d294a513f50b923..06334b619cc09f48c33f396607e2f413dcf772ee 100644 --- a/addons/project/tests/test_project_flow.py +++ b/addons/project/tests/test_project_flow.py @@ -3,7 +3,7 @@ import base64 -from .test_project_base import TestProjectBase +from .test_project_base import TestProjectCommon from odoo.tools import mute_logger from odoo.modules.module import get_resource_path @@ -34,7 +34,7 @@ Raoul Boitempoils Integrator at Agrolait""" -class TestProjectFlow(TestProjectBase): +class TestProjectFlow(TestProjectCommon): def test_project_process_project_manager_duplicate(self): pigs = self.project_pigs.with_user(self.user_projectmanager) diff --git a/addons/purchase_stock/tests/common.py b/addons/purchase_stock/tests/common.py index 1b269632e444af20faeacd35b3a2fab65ab3d526..99917378ff18c69d168a68d23dd5001093f9e0d9 100644 --- a/addons/purchase_stock/tests/common.py +++ b/addons/purchase_stock/tests/common.py @@ -7,7 +7,7 @@ from odoo import tools from odoo.modules.module import get_module_resource -class TestPurchase(TestStockCommon): +class PurchaseTestCommon(TestStockCommon): def _create_make_procurement(self, product, product_qty, date_planned=False): ProcurementGroup = self.env['procurement.group'] @@ -24,7 +24,7 @@ class TestPurchase(TestStockCommon): @classmethod def setUpClass(cls): - super(TestPurchase, cls).setUpClass() + super(PurchaseTestCommon, cls).setUpClass() cls.route_buy = cls.warehouse_1.buy_pull_id.route_id.id cls.route_mto = cls.warehouse_1.mto_pull_id.route_id.id diff --git a/addons/purchase_stock/tests/test_average_price.py b/addons/purchase_stock/tests/test_average_price.py index 099f8616bd915c4bd68a08d96d82437383e86ef9..1b59cb64231529c6cfb7c6975eb95844040a9f78 100644 --- a/addons/purchase_stock/tests/test_average_price.py +++ b/addons/purchase_stock/tests/test_average_price.py @@ -3,10 +3,10 @@ import time -from .common import TestPurchase +from .common import PurchaseTestCommon from odoo.addons.stock_account.tests.common import StockAccountTestCommon -class TestAveragePrice(TestPurchase, StockAccountTestCommon): +class TestAveragePrice(PurchaseTestCommon, StockAccountTestCommon): def test_00_average_price(self): """ Testcase for average price computation""" diff --git a/addons/purchase_stock/tests/test_fifo_price.py b/addons/purchase_stock/tests/test_fifo_price.py index c683394f650fe5bb9d835da8150693f9bc36994b..2133cfcf32cb4d402b7c435cdc5cc6e774b7d51a 100644 --- a/addons/purchase_stock/tests/test_fifo_price.py +++ b/addons/purchase_stock/tests/test_fifo_price.py @@ -2,10 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. import time -from .common import TestPurchase +from .common import PurchaseTestCommon from odoo.addons.stock_account.tests.common import StockAccountTestCommon -class TestFifoPrice(TestPurchase, StockAccountTestCommon): +class TestFifoPrice(PurchaseTestCommon, StockAccountTestCommon): def test_00_test_fifo(self): """ Test product cost price with fifo removal strategy.""" diff --git a/addons/purchase_stock/tests/test_fifo_returns.py b/addons/purchase_stock/tests/test_fifo_returns.py index c90e18b35c5d66b6e4ad5a39f4defa71ec2e506f..2052f29bf72141cbe3dd07b39aa3d017cdcc3db3 100644 --- a/addons/purchase_stock/tests/test_fifo_returns.py +++ b/addons/purchase_stock/tests/test_fifo_returns.py @@ -2,12 +2,12 @@ import time -from .common import TestPurchase +from .common import PurchaseTestCommon from odoo.tests.common import Form from odoo.addons.stock_account.tests.common import StockAccountTestCommon -class TestFifoReturns(TestPurchase, StockAccountTestCommon): +class TestFifoReturns(PurchaseTestCommon, StockAccountTestCommon): def test_fifo_returns(self): """Test to create product and purchase order to test the FIFO returns of the product""" diff --git a/addons/purchase_stock/tests/test_move_cancel_propagation.py b/addons/purchase_stock/tests/test_move_cancel_propagation.py index 9203927c47090e4cca00ce17fd4bdb499f9ec83e..ee42f75dee48036a74749e38f16372656de83122 100644 --- a/addons/purchase_stock/tests/test_move_cancel_propagation.py +++ b/addons/purchase_stock/tests/test_move_cancel_propagation.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged -from .common import TestPurchase +from .common import PurchaseTestCommon -class TestMoveCancelPropagation(TestPurchase): +class TestMoveCancelPropagation(PurchaseTestCommon): def setUp(self): super(TestMoveCancelPropagation, self).setUp() diff --git a/addons/purchase_stock/tests/test_purchase_delete_order.py b/addons/purchase_stock/tests/test_purchase_delete_order.py index 23a0279e7ba5b5a51627d04b8bf02b255981bb74..0687e76d18714af61ddb890365d5c262e3faa378 100644 --- a/addons/purchase_stock/tests/test_purchase_delete_order.py +++ b/addons/purchase_stock/tests/test_purchase_delete_order.py @@ -2,10 +2,10 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import UserError -from .common import TestPurchase +from .common import PurchaseTestCommon -class TestDeleteOrder(TestPurchase): +class TestDeleteOrder(PurchaseTestCommon): def test_00_delete_order(self): ''' Testcase for deleting purchase order with purchase user group''' diff --git a/addons/purchase_stock/tests/test_purchase_lead_time.py b/addons/purchase_stock/tests/test_purchase_lead_time.py index 61da752b2bea418cb6c912e8c7ad60d52758ddd9..07696540883f65347baa4614b529e0f39f1d19e7 100644 --- a/addons/purchase_stock/tests/test_purchase_lead_time.py +++ b/addons/purchase_stock/tests/test_purchase_lead_time.py @@ -4,10 +4,10 @@ from datetime import timedelta from odoo import fields -from .common import TestPurchase +from .common import PurchaseTestCommon -class TestPurchaseLeadTime(TestPurchase): +class TestPurchaseLeadTime(PurchaseTestCommon): def test_00_product_company_level_delays(self): """ To check dates, set product's Delivery Lead Time diff --git a/addons/purchase_stock/tests/test_purchase_order_process.py b/addons/purchase_stock/tests/test_purchase_order_process.py index 4689735882bf79f2e26b570b9ebac80ab3ffd5fb..56f091067e1b0d060df50b26903ffde0f42f7042 100644 --- a/addons/purchase_stock/tests/test_purchase_order_process.py +++ b/addons/purchase_stock/tests/test_purchase_order_process.py @@ -1,7 +1,7 @@ -from .common import TestPurchase +from .common import PurchaseTestCommon -class TestPurchaseOrderProcess(TestPurchase): +class TestPurchaseOrderProcess(PurchaseTestCommon): def test_00_cancel_purchase_order_flow(self): """ Test cancel purchase order with group user.""" diff --git a/addons/sale/tests/test_sale_common.py b/addons/sale/tests/test_sale_common.py index 3d3520683c95b8e37f1b1c05c3039221343bf42d..d609f952669f8a344cd1233ddd64287e87c42926 100644 --- a/addons/sale/tests/test_sale_common.py +++ b/addons/sale/tests/test_sale_common.py @@ -6,11 +6,11 @@ from odoo.addons.account.tests.common import AccountTestCommon from odoo.addons.account.tests.common import AccountTestNoChartCommon -class TestSale(AccountTestCommon): +class TestSaleCommon(AccountTestCommon): @classmethod def setUpClass(cls): - super(TestSale, cls).setUpClass() + super(TestSaleCommon, cls).setUpClass() # some users group_manager = cls.env.ref('sales_team.group_sale_manager') group_user = cls.env.ref('sales_team.group_sale_salesman') diff --git a/addons/sale/tests/test_sale_product_attribute_value_config.py b/addons/sale/tests/test_sale_product_attribute_value_config.py index deaed7241a5956b1f953a8273405a1a994be21bd..68d48d7f0f2fcfcffe63a9097384b67e142acf60 100644 --- a/addons/sale/tests/test_sale_product_attribute_value_config.py +++ b/addons/sale/tests/test_sale_product_attribute_value_config.py @@ -2,11 +2,11 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields -from odoo.addons.product.tests.test_product_attribute_value_config import TestProductAttributeValueSetup +from odoo.addons.product.tests.test_product_attribute_value_config import TestProductAttributeValueCommon from odoo.tests import tagged -class TestSaleProductAttributeValueSetup(TestProductAttributeValueSetup): +class TestSaleProductAttributeValueCommon(TestProductAttributeValueCommon): @classmethod def _setup_currency(cls, currency_ratio=2): @@ -59,7 +59,7 @@ class TestSaleProductAttributeValueSetup(TestProductAttributeValueSetup): @tagged('post_install', '-at_install') -class TestSaleProductAttributeValueConfig(TestSaleProductAttributeValueSetup): +class TestSaleProductAttributeValueConfig(TestSaleProductAttributeValueCommon): def _setup_pricelist(self, currency_ratio=2): to_currency = self._setup_currency(currency_ratio) diff --git a/addons/sale_coupon/tests/common.py b/addons/sale_coupon/tests/common.py index de9c4dd2388f56d40c0c5d1a7891367bc915bad4..d3e5cb279c401cbb0df0eb3c7f65e30fa3abc1ea 100644 --- a/addons/sale_coupon/tests/common.py +++ b/addons/sale_coupon/tests/common.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueSetup +from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueCommon -class TestSaleCouponCommon(TestSaleProductAttributeValueSetup): +class TestSaleCouponCommon(TestSaleProductAttributeValueCommon): @classmethod def setUpClass(cls): diff --git a/addons/sale_expense/tests/test_sale_expense.py b/addons/sale_expense/tests/test_sale_expense.py index 2f61fc67f0c03d27d8e644b5f239eab84eb13c08..445fd0bdbce45cac34c250e73b36a55c3a5946e5 100644 --- a/addons/sale_expense/tests/test_sale_expense.py +++ b/addons/sale_expense/tests/test_sale_expense.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.sale.tests.test_sale_common import TestSale +from odoo.addons.sale.tests.test_sale_common import TestSaleCommon from odoo.tests import tagged @tagged('post_install', '-at_install') -class TestSaleExpense(TestSale): +class TestSaleExpense(TestSaleCommon): def test_sale_expense(self): """ Test the behaviour of sales orders when managing expenses """ # force the pricelist to have the same currency as the company diff --git a/addons/sale_stock/tests/test_sale_stock.py b/addons/sale_stock/tests/test_sale_stock.py index e22d52f6e35e0f982b1d0cc02578125c06076cd5..9d5932522d7cdc5b8476eea18235110a09b34198 100644 --- a/addons/sale_stock/tests/test_sale_stock.py +++ b/addons/sale_stock/tests/test_sale_stock.py @@ -2,13 +2,13 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta -from odoo.addons.sale.tests.test_sale_common import TestSale +from odoo.addons.sale.tests.test_sale_common import TestSaleCommon from odoo.exceptions import UserError from odoo.tests import Form, tagged @tagged('post_install', '-at_install') -class TestSaleStock(TestSale): +class TestSaleStock(TestSaleCommon): def _get_new_sale_order(self, amount=10.0): """ Creates and returns a sale order with one default order line. diff --git a/addons/stock_landed_costs/tests/test_stockvaluationlayer.py b/addons/stock_landed_costs/tests/test_stockvaluationlayer.py index 96d9763608b747cb11d27f27a183b34ce0d850de..00fb22b8b9f525f1fc798da756c38c577eb91159 100644 --- a/addons/stock_landed_costs/tests/test_stockvaluationlayer.py +++ b/addons/stock_landed_costs/tests/test_stockvaluationlayer.py @@ -9,10 +9,10 @@ from odoo.addons.stock_account.tests.test_stockvaluation import _create_accounti from odoo.addons.stock_account.tests.common import StockAccountTestCommon -class TestStockValuationLC(TestStockValuationCommon, StockAccountTestCommon): +class TestStockValuationLCCommon(TestStockValuationCommon, StockAccountTestCommon): @classmethod def setUpClass(cls): - super(TestStockValuationLC, cls).setUpClass() + super(TestStockValuationLCCommon, cls).setUpClass() cls.productlc1 = cls.env['product.product'].create({ 'name': 'product1', 'type': 'service', @@ -77,7 +77,7 @@ class TestStockValuationLC(TestStockValuationCommon, StockAccountTestCommon): return lc -class TestStockValuationLCFIFO(TestStockValuationLC): +class TestStockValuationLCFIFO(TestStockValuationLCCommon): def setUp(self): super(TestStockValuationLCFIFO, self).setUp() self.product1.product_tmpl_id.categ_id.property_cost_method = 'fifo' @@ -179,7 +179,7 @@ class TestStockValuationLCFIFO(TestStockValuationLC): self.assertEqual(self.product1.quantity_svl, 0) -class TestStockValuationLCAVCO(TestStockValuationLC): +class TestStockValuationLCAVCO(TestStockValuationLCCommon): def setUp(self): super(TestStockValuationLCAVCO, self).setUp() self.product1.product_tmpl_id.categ_id.property_cost_method = 'average' @@ -221,7 +221,7 @@ class TestStockValuationLCAVCO(TestStockValuationLC): self.assertEqual(self.product1.quantity_svl, 19) -class TestStockValuationLCFIFOVB(TestStockValuationLC): +class TestStockValuationLCFIFOVB(TestStockValuationLCCommon): @classmethod def setUpClass(cls): super(TestStockValuationLCFIFOVB, cls).setUpClass() diff --git a/addons/survey/tests/common.py b/addons/survey/tests/common.py index bf73f5ecb47a9232bca7315e4e120a24ec385762..2563e44aae486c64ce25f535965787e5669c69fc 100644 --- a/addons/survey/tests/common.py +++ b/addons/survey/tests/common.py @@ -12,9 +12,9 @@ from odoo.tests import common, new_test_user survey_new_test_user = partial(new_test_user, context={'mail_create_nolog': True, 'mail_create_nosubscribe': True, 'mail_notrack': True, 'no_reset_password': True}) -class SurveyCase(common.SavepointCase): +class TestSurveyCommon(common.SavepointCase): def setUp(self): - super(SurveyCase, self).setUp() + super(TestSurveyCommon, self).setUp() """ Some custom stuff to make the matching between questions and answers :param dict _type_match: dict diff --git a/addons/survey/tests/test_certification_badge.py b/addons/survey/tests/test_certification_badge.py index 43125ad4a0258bb5b992c375a9ba177fa6b2a7bf..818045199a7f6b746d3c1aaa5605ed66780d01ae 100644 --- a/addons/survey/tests/test_certification_badge.py +++ b/addons/survey/tests/test_certification_badge.py @@ -7,7 +7,7 @@ from odoo.exceptions import AccessError from odoo.tools import mute_logger -class TestCertificationBadge(common.SurveyCase): +class TestCertificationBadge(common.TestSurveyCommon): def setUp(self): super(TestCertificationBadge, self).setUp() self.certification_survey = self.env['survey.survey'].with_user(self.survey_manager).create({ diff --git a/addons/survey/tests/test_certification_flow.py b/addons/survey/tests/test_certification_flow.py index 16b45bcd7c23d47e23413dafc3bb217bedd72a48..d1c6f39405f1e0984b25c80b5c34007cac31475f 100644 --- a/addons/survey/tests/test_certification_flow.py +++ b/addons/survey/tests/test_certification_flow.py @@ -10,7 +10,7 @@ from odoo.tests.common import HttpCase @tagged('-at_install', 'post_install', 'functional') -class TestCertificationFlow(common.SurveyCase, HttpCase): +class TestCertificationFlow(common.TestSurveyCommon, HttpCase): def _answer_question(self, question, answer, answer_token, csrf_token, button_submit='next'): # Employee submits the question answer post_data = self._format_submission_data(question, answer, {'csrf_token': csrf_token, 'token': answer_token, 'button_submit': button_submit}) diff --git a/addons/survey/tests/test_survey.py b/addons/survey/tests/test_survey.py index 1f94723d0453ca04e40967583400c992480827c0..67e44eb33de27adb1f0040f4ddd020bb41701130 100644 --- a/addons/survey/tests/test_survey.py +++ b/addons/survey/tests/test_survey.py @@ -13,7 +13,7 @@ from odoo.addons.survey.tests import common from odoo.tests.common import users -class TestSurveyInternals(common.SurveyCase): +class TestSurveyInternals(common.TestSurveyCommon): @users('survey_manager') def test_answer_validation_mandatory(self): diff --git a/addons/survey/tests/test_survey_compute_pages_questions.py b/addons/survey/tests/test_survey_compute_pages_questions.py index 0ab8ff567c1e83bb761ac892224b7435bcf3c99c..daae66028e53f3603c5a6f9a90ecc44610c2bed8 100644 --- a/addons/survey/tests/test_survey_compute_pages_questions.py +++ b/addons/survey/tests/test_survey_compute_pages_questions.py @@ -4,7 +4,7 @@ from odoo.addons.survey.tests import common -class TestSurveyComputePagesQuestions(common.SurveyCase): +class TestSurveyComputePagesQuestions(common.TestSurveyCommon): def test_compute_pages_questions(self): with self.with_user(self.survey_manager): survey = self.env['survey.survey'].create({ diff --git a/addons/survey/tests/test_survey_flow.py b/addons/survey/tests/test_survey_flow.py index 70d5f48663fc2bda8275cdfccab99c1e47ed9c39..5712682df3fff0abcab087c66009a323a55bbb3d 100644 --- a/addons/survey/tests/test_survey_flow.py +++ b/addons/survey/tests/test_survey_flow.py @@ -7,7 +7,7 @@ from odoo.tests.common import HttpCase @tagged('-at_install', 'post_install', 'functional') -class TestSurveyFlow(common.SurveyCase, HttpCase): +class TestSurveyFlow(common.TestSurveyCommon, HttpCase): def _format_submission_data(self, page, answer_data, additional_post_data): post_data = {} post_data['page_id'] = page.id diff --git a/addons/survey/tests/test_survey_invite.py b/addons/survey/tests/test_survey_invite.py index 04a76d099ddc78f206871094b9c399fc8c2553c4..ff8995fb6416471e3835f18c34a92d795d6b21d6 100644 --- a/addons/survey/tests/test_survey_invite.py +++ b/addons/survey/tests/test_survey_invite.py @@ -11,7 +11,7 @@ from odoo.tests import Form from odoo.tests.common import users -class TestSurveyInvite(common.SurveyCase): +class TestSurveyInvite(common.TestSurveyCommon): def setUp(self): res = super(TestSurveyInvite, self).setUp() diff --git a/addons/survey/tests/test_survey_security.py b/addons/survey/tests/test_survey_security.py index d5655215c34d2bcdeb3578741436200df1282ba4..d163adb4dc21fb43de4e6674cd24fa83ac6f716b 100644 --- a/addons/survey/tests/test_survey_security.py +++ b/addons/survey/tests/test_survey_security.py @@ -9,7 +9,7 @@ from odoo.tools import mute_logger @tagged('security') -class TestAccess(common.SurveyCase): +class TestAccess(common.TestSurveyCommon): def setUp(self): super(TestAccess, self).setUp() diff --git a/addons/website_crm_partner_assign/tests/test_partner_assign.py b/addons/website_crm_partner_assign/tests/test_partner_assign.py index 49fc69e707373f3813402959bd1c5f64572f3a0e..2d9d015d23bbf95cf68a57717345fc6964974e5a 100644 --- a/addons/website_crm_partner_assign/tests/test_partner_assign.py +++ b/addons/website_crm_partner_assign/tests/test_partner_assign.py @@ -8,7 +8,7 @@ except ImportError: from odoo.exceptions import AccessError from odoo.tests.common import TransactionCase -from odoo.addons.crm.tests.common import TestCrmCases +from odoo.addons.crm.tests.common import TestCrmCommon class TestPartnerAssign(TransactionCase): @@ -86,7 +86,7 @@ class TestPartnerAssign(TransactionCase): pass -class TestPartnerLeadPortal(TestCrmCases): +class TestPartnerLeadPortal(TestCrmCommon): def setUp(self): super(TestPartnerLeadPortal, self).setUp() diff --git a/addons/website_sale/tests/test_website_sale_product_attribute_value_config.py b/addons/website_sale/tests/test_website_sale_product_attribute_value_config.py index bc900977fef26e6ade335e9ba49338f8005bf57c..7b446e05f2166afe423fa69fd527548f105435ae 100644 --- a/addons/website_sale/tests/test_website_sale_product_attribute_value_config.py +++ b/addons/website_sale/tests/test_website_sale_product_attribute_value_config.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueSetup +from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueCommon from odoo.tests import tagged @tagged('post_install', '-at_install') -class TestWebsiteSaleProductAttributeValueConfig(TestSaleProductAttributeValueSetup): +class TestWebsiteSaleProductAttributeValueConfig(TestSaleProductAttributeValueCommon): def test_get_combination_info(self): current_website = self.env['website'].get_current_website() diff --git a/addons/website_sale_coupon/tests/test_shop_sale_coupon.py b/addons/website_sale_coupon/tests/test_shop_sale_coupon.py index 1522cf2f4f174850477e64d3e6995f05100072c1..8ab425148915ddcb8575c9bc08fab2e3606ad395 100644 --- a/addons/website_sale_coupon/tests/test_shop_sale_coupon.py +++ b/addons/website_sale_coupon/tests/test_shop_sale_coupon.py @@ -3,11 +3,11 @@ from datetime import timedelta from odoo import fields from odoo.tests import HttpCase, tagged, TransactionCase -from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueSetup +from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueCommon @tagged('post_install', '-at_install') -class TestUi(TestSaleProductAttributeValueSetup, HttpCase): +class TestUi(TestSaleProductAttributeValueCommon, HttpCase): @classmethod def setUpClass(cls): diff --git a/addons/website_slides_survey/tests/test_course_certification_failure.py b/addons/website_slides_survey/tests/test_course_certification_failure.py index 8ddf8ffdab86f63fe84e88be994b58961290deeb..f370b9d646e338f10b6e99dcea2a952ab74d59f7 100644 --- a/addons/website_slides_survey/tests/test_course_certification_failure.py +++ b/addons/website_slides_survey/tests/test_course_certification_failure.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.survey.tests.common import SurveyCase +from odoo.addons.survey.tests.common import TestSurveyCommon -class TestCourseCertificationFailureFlow(SurveyCase): +class TestCourseCertificationFailureFlow(TestSurveyCommon): def test_course_certification_failure_flow(self): # Step 1: create a simple certification # --------------------------------------------------