Commit Graph

16 Commits

Author SHA1 Message Date
Xavier Morel 11ba4689b1 [IMP] running speed of some tests & new testcase type
Some tests (e.g. mail) have expensive and significant DB setup for a
number of small and cheap tests. Using a TransactionCase, the DB setup
far dominates the tests themselves, by up to 10x (mail unit tests take
~130s on my machine, the tests themselves take ~15s).

The SavepointCase introduced here is an hybrid of SingleTransactionCase
and TransactionCase: it uses a single transaction for all tests in a
class, but each test case is isolated by a rollbacked savepoint. This
allows a common DB setup (via setUpClass) while keeping independent
tests.

TransactionCase should remain the primary test case superclass, but
SavepointCase can be a fair optimisation when setup costs far dominate.
2015-06-23 16:38:14 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Denis Ledoux 7b0eb9b1a8 [FIX] mail: forward-port of rev 245bb4ebdf 2014-08-12 15:16:49 +02:00
Thibault Delavallée 7f0353974d [REF] mail: same_thread field changed into no_auto_thread, its contrary, to avoid migration issues (adding a 'always False' column is easier than an 'always True'). 2014-08-04 14:46:47 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Thibault Delavallée 719a4f02c9 [REF] mail, crm, hr_recruitment, project, project_issue: simplified reply-to of notification emails (now displaying 'YourCompany -docname- <email>' instead of 'Followers of ...'; added same_thread directly on the mail.message model to ease the reply_to and message-id computation; factorized a bit the reply-to generation for a batch of records; udpated tests accordingly. 2014-06-23 10:47:47 +02:00
Thibault Delavallée d10f471019 [FIX] [TESTS] mail, portal: fixed tests, because the error raised by the OROM has changed in some cases.
bzr revid: tde@openerp.com-20131206121432-mz2jpj535tmcmftl
2013-12-06 13:14:32 +01:00
Thibault Delavallée b35a44f66d [IMP] mail_mail, mail_message: various improvements to try to improve message creation time
Replaced some read by browse
Moved get_reply_to from mail_mail to mail_message
Hint: specifying email_from, reply_to help to enhance computation time

[REF] mail: cleaned some tests, renamed a file, moved mail_group tests into a dedicated file

bzr revid: tde@openerp.com-20130827133058-ko0g0ib0f0jihmdk
2013-08-27 15:30:58 +02:00
Thibault Delavallée cd13bb9cf9 [CLEAN] mail: stop doing ugly things with partner_ids values before passing values to mail_message.create().
bzr revid: tde@openerp.com-20130221095906-5rbwnc83mjvpkyhh
2013-02-21 10:59:06 +01:00
Thibault Delavallée 89ba499556 [IMP] Partners do not follow themselves by default now.
bzr revid: tde@openerp.com-20130109104513-3vlyw4knqp4d6to2
2013-01-09 11:45:13 +01:00
Thibault Delavallée f1ee7f1ad9 [IMP] mail_message: added the right to reply to a message wes received even if we cannot see the related document.
bzr revid: tde@openerp.com-20121212160634-umbiq2erwijm2d20
2012-12-12 17:06:34 +01:00
Thibault Delavallée 090123436b [IMP] mail: updated lambda user, now having less permissive access rights on mail_mail.
bzr revid: tde@openerp.com-20121212114905-5kgnoix0puxo30ns
2012-12-12 12:49:05 +01:00
Thibault Delavallée 0be4d969af [IMP] mail: updated and improved tests.
bzr revid: tde@openerp.com-20121212104220-d6l7wjghv9oo9dy1
2012-12-12 11:42:20 +01:00
Thibault Delavallée b541e7ce64 [MERGE] Sync with trunk. Cleaned a bit things lastly added in trunk/mail/tests.
bzr revid: tde@openerp.com-20121211161458-d7wv4lnkvs9s7srj
2012-12-11 17:14:58 +01:00
Thibault Delavallée 3a1e0059a2 [MERGE] Merged branch holding fix of access rights when deleting a document, and the removal of inherits between mail.group and ir.ui.menu.
bzr revid: tde@openerp.com-20121211145536-a02i45isg30l9940
2012-12-11 15:55:36 +01:00
Thibault Delavallée db32d98b7a [REF] [TESTS] mail, portal: refactored a bit the various mail and invite tests: moved some tests into dedicated files, added some new tests, removed duplicates.
bzr revid: tde@openerp.com-20121211144650-kpy7noe082e3xvoo
2012-12-11 15:46:50 +01:00