Commit Graph

6 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
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 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