[MOV] sales_team: reorganize tests

PURPOSE

Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.

SPECIFICATIONS

Reorganize sales team tests to ease addition and modifications of tests
when adding multi-membership and lead assignment features.

LINKS

Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
This commit is contained in:
Thibault Delavallée
2021-01-07 11:15:20 +00:00
parent d47ff19014
commit 3e287843f0
2 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import common
from . import test_sales_team_membership
from . import test_sales_team
@@ -1,17 +1,26 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.sales_team.tests.common import TestSalesMC
from odoo.addons.sales_team.tests.common import TestSalesCommon
class TestDefaultTeam(TestSalesMC):
class TestDefaultTeam(TestSalesCommon):
"""Tests to check if correct default team is found."""
@classmethod
def setUpClass(cls):
"""Set up data for default team tests."""
super(TestDefaultTeam, cls).setUpClass()
cls.company_2 = cls.env['res.company'].create({
'name': 'New Test Company',
'email': 'company.2@test.example.com',
'country_id': cls.env.ref('base.fr'),
})
cls.team_c2 = cls.env['crm.team'].create({
'name': 'C2 Team1',
'sequence': 1,
'company_id': cls.company_2.id,
})
cls.team_sequence = cls.env['crm.team'].create({
'name': 'Team LowSequence',
'sequence': 0,