Commit Graph

9 Commits

Author SHA1 Message Date
Xavier Morel f5b88f6309 [IMP] minor perf improvement during tests
During tests, some creation of user records would unnecessarily trigger
password reset or set a password, both of which would trigger password
hashing which takes some time (for good reasons).

Fix by:
* passing no_reset_password in YAML tests and some Python tests still
  missing it (a number of Python tests already used it)
* removing passwords from YAML records as they're never necessary, the
  test user records are not expected to ever log in
2015-06-26 14:22:29 +02:00
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
Xavier Morel 65cd4a2a33 [FIX] remove deprecated checks/fast_suite test attributes from standard modules 2015-01-15 14:31:40 +01: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 ef8322273e [FIX] [TESTS] project, hr_holidays and portal-related modules: fixed tests, because the raised errors have been updated
bzr revid: tde@openerp.com-20131206125751-lx5ki1nz10pdo63r
2013-12-06 13:57:51 +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 98ec74dd62 [IMP] project_issue: added date_last_stage_update in reports; removed month_last_stgae_update in project_task, only date is sufficient because reports already handle this correctly. Updated coding style of tests.
bzr revid: tde@openerp.com-20130710132954-tnr75cf33nti8r1u
2013-07-10 15:29:54 +02:00
Thibault Delavallée 4b0baa3615 [CLEAN] project, project_issue, project_mrp: misc cleaning of code + fixed bug in project_mrp + re-added commentred tests in project_mrp
bzr revid: tde@openerp.com-20130710122526-tf87avul7huqgigg
2013-07-10 14:25:26 +02:00
Thibault Delavallée 9b41f8fadc [TESTS] project: refactored tests. Moved surviving yml tests into unittest; added mailgateway test.
bzr revid: tde@openerp.com-20130710101508-62eh89gzq22qvpq5
2013-07-10 12:15:08 +02:00