Commit Graph

7 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
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 4387187b8b [IMP] mail: invite: slighty updated invite message. Updated tests accordingly.
bzr revid: tde@openerp.com-20130315110554-rszi5u1c9dybzq46
2013-03-15 12:05:54 +01:00
Christophe Matthieu a57c079700 [IMP] mail_followers: invite tests
bzr revid: chm@openerp.com-20130305101143-6mcydxw60y18kw20
2013-03-05 11:11:43 +01:00
Christophe Matthieu edf89a76e7 [FIX] mail invite: add send_mail inside test
bzr revid: chm@openerp.com-20130227151204-fla559l37rilnhvb
2013-02-27 16:12:04 +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 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