diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-04-23 11:54:39 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-04-24 15:35:43 +0000 |
| commit | 7946b42ef546260f47566cd356eab5a911beff7a (patch) | |
| tree | c0e29a5d7015f1006c80f160ff6adac6989df5c7 /addons/test_mail_full | |
| parent | 97214888173a830425616ceafb18e5f394b65c5c (diff) | |
[IMP] link_tracker, (test_)mass_mailing: improve test tools and clean existing tests
URPOSE
Prepare code cleaning and optimization in mail, mass_mailing and SMS by
cleaning models for readability and code complexity and footprint reduction.
SPECIFICATIONS
Add tool methods and asserts for link tracker tests.
Add tool methods and assets for mass mailing tests, notably about mailing
traces and their link with emails.
Merge existing and duplicated tests and rewrite them a bit.
Rename and improve test_mass_mailing models.
LINKS
Prepares task ID 2238597 (notification and trace models cleaning)
Task ID 1906925 (mass mailing tests cleaning)
PR #50169
Related: odoo/enterprise#10180
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/test_mail_full')
| -rw-r--r-- | addons/test_mail_full/tests/common.py | 2 | ||||
| -rw-r--r-- | addons/test_mail_full/tests/test_mass_sms.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/addons/test_mail_full/tests/common.py b/addons/test_mail_full/tests/common.py index a2e98e2a0a3..6fac92a5aab 100644 --- a/addons/test_mail_full/tests/common.py +++ b/addons/test_mail_full/tests/common.py @@ -6,7 +6,7 @@ from odoo.addons.test_mail.tests import common as test_mail_common from odoo.addons.test_mass_mailing.tests import common as test_mass_mailing_common -class TestSMSCommon(test_mass_mailing_common.TestMailCommon, mass_mailing_sms_common.MockSMS): +class TestSMSCommon(test_mass_mailing_common.TestMassMailCommon, mass_mailing_sms_common.MockSMS): @classmethod def setUpClass(cls): diff --git a/addons/test_mail_full/tests/test_mass_sms.py b/addons/test_mail_full/tests/test_mass_sms.py index 42d58bde0c7..b43ff773316 100644 --- a/addons/test_mail_full/tests/test_mass_sms.py +++ b/addons/test_mail_full/tests/test_mass_sms.py @@ -58,7 +58,7 @@ class TestMassSMS(test_mail_full_common.TestSMSCommon): }) def test_mass_sms_internals(self): - with self.with_user('marketing'): + with self.with_user('user_marketing'): mailing = self.env['mailing.mailing'].create({ 'name': 'Xmas Spam', 'subject': 'Xmas Spam', @@ -105,7 +105,7 @@ class TestMassSMS(test_mail_full_common.TestSMSCommon): }) records_numbers = self.records_numbers + ['+32456999999'] - with self.with_user('marketing'): + with self.with_user('user_marketing'): with self.mockSMSGateway(): self.mailing.action_send_sms() @@ -119,7 +119,7 @@ class TestMassSMS(test_mail_full_common.TestSMSCommon): ) def test_mass_sms_internals_done_ids(self): - with self.with_user('marketing'): + with self.with_user('user_marketing'): with self.mockSMSGateway(): self.mailing.action_send_sms(res_ids=self.records[:5].ids) @@ -131,7 +131,7 @@ class TestMassSMS(test_mail_full_common.TestSMSCommon): self.mailing, self.records[:5], check_sms=True ) - with self.with_user('marketing'): + with self.with_user('user_marketing'): with self.mockSMSGateway(): self.mailing.action_send_sms(res_ids=self.records.ids) |
