<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/test_mail/tests/test_message_composer.py, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[MOV] mail, test_mail: merge and improve composer tests</title>
<updated>2021-04-08T15:06:04+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2021-04-07T10:09:45+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=51700491ae3b26d513ddfeda378a60592fca6eab'/>
<id>51700491ae3b26d513ddfeda378a60592fca6eab</id>
<content type='text'>
This commits is a bit a followup of odoo/odoo#62061 where new composer tests
were added. This commit finalize this work by merging all composer related
tests within the same file. It also backports some of tooling update done
in odoo/odoo#64459 or odoo/odoo#63677 in order to have coherent naming
through 14+ versions.

Some additional or deeper tests are added. Notably it now more cleanly
uses asserts for created mail.mail and sent emails.

Task ID-2500615
COM PR odoo/odoo#68874</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commits is a bit a followup of odoo/odoo#62061 where new composer tests
were added. This commit finalize this work by merging all composer related
tests within the same file. It also backports some of tooling update done
in odoo/odoo#64459 or odoo/odoo#63677 in order to have coherent naming
through 14+ versions.

Some additional or deeper tests are added. Notably it now more cleanly
uses asserts for created mail.mail and sent emails.

Task ID-2500615
COM PR odoo/odoo#68874</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] test_mail: add new mail composer tests for its internals</title>
<updated>2020-11-26T08:45:55+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-10-21T12:51:32+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=def98d2375a8a906092293f0aa1ce03bf948d2d3'/>
<id>def98d2375a8a906092293f0aa1ce03bf948d2d3</id>
<content type='text'>
Purpose is to have some low level tests for composer itself allowing to
ensure its behavior. We add tests notably about default values computation
in mass mailing mode as well as template_id change and values synchronization
in composer model.

In a near future composer will probably be improved (use computed fields,
rewrite part of its logic to improve performances). Having tests done before
those tasks ensure we notice every change that might happen.

Task ID-2390314
PR odoo/odoo#62061</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose is to have some low level tests for composer itself allowing to
ensure its behavior. We add tests notably about default values computation
in mass mailing mode as well as template_id change and values synchronization
in composer model.

In a near future composer will probably be improved (use computed fields,
rewrite part of its logic to improve performances). Having tests done before
those tasks ensure we notice every change that might happen.

Task ID-2390314
PR odoo/odoo#62061</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] (test_)(mass_)mail(_full): rename and reorganize mail related test classes</title>
<updated>2020-05-26T10:35:58+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2020-04-29T11:38:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4a2ac044f8bd4a5a1f96f0e45c008473dc15eec3'/>
<id>4a2ac044f8bd4a5a1f96f0e45c008473dc15eec3</id>
<content type='text'>
Modules holding tests and helpers

  * link_tracker: mainly mock, asserts and tools for link tracker tests
    (MockLinkTracker);
  * mail: mainly gateway mock and base for mail tests
    * MockEmail -&gt; mocks for mail gateway;
    * MailCase -&gt; tools and asserts for mail tests;
    * MailCommon -&gt;     base for mail functional tests);

  * sms: mainly SMS gateway mock and base for sms tests
    * MockSMS -&gt; mocks for SMS gateway;
    * SMS Case -&gt; tools and asserts for mail / SMS tests;
    * SMSCommon -&gt; update of MailCommon with SMS capabilities);

  * mass_mailing: mainly asserts and tools for mass mailing tests
    * MassMailCase -&gt; update of MailCase for mass mailing tools and asserts;
    * MassMailCommon -&gt; update of MailCommon with mass mailing);

  * mass_mailing_sms: mainly asserts and tools for mass SMS tests
    * MockMassSMS -&gt; update of MockSMS for mass SMS tools and asserts;
    * MassSMSCommon -&gt; update of MassMailCommon with SMS capabilities);

Modules for tests

  * test_mail: module for mail app tests (TestMailCommon);
  * test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
  * test_mail_full: tests integrating all discuss features, currently mainly
    mail and SMS (TestMailFullCommon);

Enterprise: update test_mail_enterprise and test_marketing_automation

Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modules holding tests and helpers

  * link_tracker: mainly mock, asserts and tools for link tracker tests
    (MockLinkTracker);
  * mail: mainly gateway mock and base for mail tests
    * MockEmail -&gt; mocks for mail gateway;
    * MailCase -&gt; tools and asserts for mail tests;
    * MailCommon -&gt;     base for mail functional tests);

  * sms: mainly SMS gateway mock and base for sms tests
    * MockSMS -&gt; mocks for SMS gateway;
    * SMS Case -&gt; tools and asserts for mail / SMS tests;
    * SMSCommon -&gt; update of MailCommon with SMS capabilities);

  * mass_mailing: mainly asserts and tools for mass mailing tests
    * MassMailCase -&gt; update of MailCase for mass mailing tools and asserts;
    * MassMailCommon -&gt; update of MailCommon with mass mailing);

  * mass_mailing_sms: mainly asserts and tools for mass SMS tests
    * MockMassSMS -&gt; update of MockSMS for mass SMS tools and asserts;
    * MassSMSCommon -&gt; update of MassMailCommon with SMS capabilities);

Modules for tests

  * test_mail: module for mail app tests (TestMailCommon);
  * test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
  * test_mail_full: tests integrating all discuss features, currently mainly
    mail and SMS (TestMailFullCommon);

Enterprise: update test_mail_enterprise and test_marketing_automation

Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[IMP] test_mail(_full): run tests at post_install"</title>
<updated>2020-01-23T09:19:12+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2020-01-23T09:19:12+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8970127c036a138c7cdc19ec67cc3553b13d4913'/>
<id>8970127c036a138c7cdc19ec67cc3553b13d4913</id>
<content type='text'>
This reverts commit 976e560a877bcaf9e769b6005d33bd49833eceb9.

Even if it didn't looked like a bad idea, this need some more thinking.
This new version of query count creates random failure of runbot builds.

closes odoo/odoo#43820

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 976e560a877bcaf9e769b6005d33bd49833eceb9.

Even if it didn't looked like a bad idea, this need some more thinking.
This new version of query count creates random failure of runbot builds.

closes odoo/odoo#43820

Signed-off-by: Thibault Delavallee (tde) &lt;tde@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] test_mail(_full): run tests at post_install</title>
<updated>2020-01-22T13:36:22+00:00</updated>
<author>
<name>Sébastien Theys</name>
<email>seb@odoo.com</email>
</author>
<published>2020-01-22T13:32:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=976e560a877bcaf9e769b6005d33bd49833eceb9'/>
<id>976e560a877bcaf9e769b6005d33bd49833eceb9</id>
<content type='text'>
- take advantage of runbot multi-build capabilities
- get similar result when running them locally during dev
- better detect when other modules add extra queries

Query counts are split in the base value (testing with just test_mail installed)
+ the extra modules overhead.

Part of task-2178641

closes odoo/odoo#43666

Pr: #43666
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- take advantage of runbot multi-build capabilities
- get similar result when running them locally during dev
- better detect when other modules add extra queries

Query counts are split in the base value (testing with just test_mail installed)
+ the extra modules overhead.

Part of task-2178641

closes odoo/odoo#43666

Pr: #43666
Signed-off-by: Alexandre Kühn (aku) &lt;aku@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mail: restrict access to mail.mail model</title>
<updated>2019-11-29T13:35:14+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-10-24T09:05:16+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=69ccabb212d83bfee60c7dade36ca4b06f9f2f12'/>
<id>69ccabb212d83bfee60c7dade36ca4b06f9f2f12</id>
<content type='text'>
From now on mail.mail is considered as a technical model. Indeed people should
not really manually craft mails by hand. Instead various functional flows
should either send mails, either craft mails based on some user input.

We therefore make mail restricted to admin users. Flows creating mail.mail
are updated to use sudo, and ensure it was done in a context that makes
sense to delegate this power to the user.

Task ID 1853147
PR #32243</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From now on mail.mail is considered as a technical model. Indeed people should
not really manually craft mails by hand. Instead various functional flows
should either send mails, either craft mails based on some user input.

We therefore make mail restricted to admin users. Flows creating mail.mail
are updated to use sudo, and ensure it was done in a context that makes
sense to delegate this power to the user.

Task ID 1853147
PR #32243</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] test_mail: update test message composer / message track / activity to new common</title>
<updated>2019-11-20T16:00:47+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-10-08T15:03:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f926f63212e2da6e7def7ae45c9b3d1e6ff62a82'/>
<id>f926f63212e2da6e7def7ae45c9b3d1e6ff62a82</id>
<content type='text'>
PURPOSE

Currently tools and asserts for mail tests are located inside test_mail
module. It makes difficult to re-use them in apps tests or force them to
write custom quick and dirty tools and asserts.

SPECIFICATIONS

Update tests to new tools / asserts / helpers / classes defined in mail
and test_mail. Notably

  * ``BaseFunctionalTest`` class is replaced by the new ``TestMailCommon``
    pimped one;
  * ``assertNotifications`` is replaced by ``assertSinglePostNotifications``
    (shortcut for a simple message_post) or ``assertPostNotifications``
    (complete asserts involving several messages and notifications);
  * correctly invoke ``mock_mail_gateway`` when mocking email sending;
  * replace manual check of sent emails or ``assertEmails`` by
    ``assertSentEmails``;
  * remove custom mocks / checks and replace them by now standard mocks
    and assertions (if any);

In this commit we update: test_message_composer, test_message_track and
test_mail_activity.

LINKS

Task ID 2068986
PR #38070</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Currently tools and asserts for mail tests are located inside test_mail
module. It makes difficult to re-use them in apps tests or force them to
write custom quick and dirty tools and asserts.

SPECIFICATIONS

Update tests to new tools / asserts / helpers / classes defined in mail
and test_mail. Notably

  * ``BaseFunctionalTest`` class is replaced by the new ``TestMailCommon``
    pimped one;
  * ``assertNotifications`` is replaced by ``assertSinglePostNotifications``
    (shortcut for a simple message_post) or ``assertPostNotifications``
    (complete asserts involving several messages and notifications);
  * correctly invoke ``mock_mail_gateway`` when mocking email sending;
  * replace manual check of sent emails or ``assertEmails`` by
    ``assertSentEmails``;
  * remove custom mocks / checks and replace them by now standard mocks
    and assertions (if any);

In this commit we update: test_message_composer, test_message_track and
test_mail_activity.

LINKS

Task ID 2068986
PR #38070</pre>
</div>
</content>
</entry>
<entry>
<title>[MOV] test_mail: move composer and post tests from template tests</title>
<updated>2019-09-06T13:37:56+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-09-06T13:19:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=62bd4c07f4c0cfdedcaedb08614854d3dc9e6cb1'/>
<id>62bd4c07f4c0cfdedcaedb08614854d3dc9e6cb1</id>
<content type='text'>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Reorganize tests, notably

  * put composer with template tests in with composer tests;
  * put post with template tests with post tests;
  * put tracking multi company test with tracking tests;

LINKS

Task 1958697</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Reorganize tests, notably

  * put composer with template tests in with composer tests;
  * put post with template tests with post tests;
  * put tracking multi company test with tracking tests;

LINKS

Task 1958697</pre>
</div>
</content>
</entry>
<entry>
<title>[MOV] test_mail: split post and composer tests</title>
<updated>2019-09-06T13:37:56+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-09-06T10:18:27+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8a8da21d2ecc59542be549812b2c6b89bd86f3db'/>
<id>8a8da21d2ecc59542be549812b2c6b89bd86f3db</id>
<content type='text'>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Reorganize tests, notably

  * put message_post related test in test_message_post;
  * have only composer related test in test_message_compose(r);
  * put alias tests in test_mail_gateway;
  * move some discuss tests to post tests as they are linked to notification
    details, not really Discuss features.

LINKS

Task 1958697</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.

SPECIFICATIONS

Reorganize tests, notably

  * put message_post related test in test_message_post;
  * have only composer related test in test_message_compose(r);
  * put alias tests in test_mail_gateway;
  * move some discuss tests to post tests as they are linked to notification
    details, not really Discuss features.

LINKS

Task 1958697</pre>
</div>
</content>
</entry>
</feed>
