Commit Graph
170 Commits
Author SHA1 Message Date
Cédric Krier b20ee5bb48 Use subTest inside loop in ModuleTestCase
issue11195
review393571002
2022-02-07 00:40:56 +01:00
Cédric Krier a0bfbfa255 Follow isort formatting
issue10928
2021-12-11 17:58:45 +01:00
Cédric Krier 7d879abef6 Use same context as clients to evaluate PYSON
issue10963
review372581002
2021-11-28 13:45:54 +01:00
Cédric Krier 5e5c36b459 Add test on domain of relation fields
issue10794
review383081002
2021-10-03 13:45:32 +02:00
Cédric Krier 4840a0f46d Ensure that objects in the Pool has __slots__
issue10719
review375361002
2021-09-23 23:12:35 +02:00
Cédric Krier fb9238b8bf Add digits mixin
issue10596
review338511002
2021-08-21 09:05:34 +02:00
Cédric Krier 6a626d3bad Import unittest.mock before using it
issue10422
2021-05-15 17:53:23 +02:00
Cédric Krier ebbb533eb5 Use start and stop methods of patch in scenario
This ensure that the modification on the object are removed at the end of the
scenario.

issue10422
review332891002
2021-05-15 09:22:28 +02:00
Albert Cervera i Areny f56915879f Fix typo in test_depend_exists message
issue10305
review342151002
2021-04-23 20:14:57 +02:00
Cédric Krier d7b3e7a2ef Add missing ending quote to missing method message 2021-04-19 18:01:19 +02:00
Cédric Krier 45d406e270 Add full text and similarity search
issue10023
review320601007
2021-03-21 16:21:05 +01:00
Cédric Krier 048489ab4a Test wizard's StateView is of type 'form'
issue10143
review335701004
2021-03-11 19:16:41 +01:00
Cédric Krier 04a0aea2ad Add __access__ to Model
issue9903
review324601002
2021-03-07 11:13:53 +01:00
Cédric Krier 1984f83bbf Display simpler and clearer error message for assertIn using dictionary 2020-10-09 21:21:33 +02:00
Cédric Krier cd7d40eb07 Add symbol widget
issue9059
review276871002
2020-10-09 19:09:06 +02:00
Cédric Krier c2e22d9d43 Add language attribute to data tag
issue9559
review302061002
2020-09-18 00:06:31 +02:00
Cédric Krier 7521bfd8df Test icons of each module
This ensures that the path is valid.

issue9291
review315431002
2020-05-10 12:02:59 +02:00
Cédric Krier 5626018cd6 Add export CSV data route
issue9090
review261011002
2020-04-12 23:10:30 +02:00
Cédric Krier b12d729c2d Add test on target of relation fields
issue9132
review291211004
2020-04-02 00:01:14 +02:00
Cédric Krier 5a340c90cb Replace assert in unit test
issue8904
review250351002
2019-12-18 22:41:53 +01:00
Cédric Krier 6250b08db5 Test wizard button points to existing state
issue8901
review282511002
2019-12-14 10:44:55 +01:00
Nicolas Évrard 8fb13634ea Use direct access to backend classes
issue8836
review258421002
2019-12-06 17:33:47 +01:00
Cédric Krier af5b9fd1cb Improve tests on depends
Add check for _parent_ when depends on Many2One. If the Many2One has a reverse
One2Many, there should be also _parent_ depend in case the record is edited
from the One2Many.
Ensure depends are existing field.

issue8712
review258221002
2019-10-16 21:24:06 +02:00
Sergi Almacellas Abellana b60b01c569 Ensure view arch is defined on test_view
issue8603
review270141003
2019-09-12 18:54:25 +02:00
Sergi Almacellas Abellana a338fa6478 Validate xml files definition on tests
Update tryton.rnc format and use grouped attribute on message.xml

issue8556
review272001002
2019-08-09 16:31:29 +02:00
Cédric Krier ac9fc496df Convert cache_name by TableHandler when used as database name
The name of the cache can be longer than the maximum length of database name.
2019-07-28 16:05:45 +02:00
Cédric Krier eb3882e113 Verify keys of fields and buttons states
issue8262
review279221003
2019-04-12 13:08:01 +02:00
Cédric Krier 1c4067891e Do not start a transaction to init database
An uninitialized database does not have the ir_cache table so Transaction.start fails.

issue8032
review72391002
2019-01-28 09:15:33 +01:00
Cédric Krier da24071467 Make Cache transactional
We implement sync, commit and rollback to follow transaction semantic.
When a transaction clears a cache, the global cache is cleared only when the
transaction is committed meanwhile the transaction will use a cache for itself
only.
We remove _nocache option because the sync, commit and rollback operate only
for the transaction.

issue7975
review53521002
2019-01-18 11:57:11 +01:00
Cédric Krier 0dc396904f Add extras modules to ModuleTestCase
issue7935
review50661002
2019-01-17 17:22:22 +01:00
Cédric Krier 99580a2e6a Ensure to rollback and clean cache on exception
Exception raised in a test decorated by with_transaction should always clear
the cache to avoid leaking to other tests.

issue7829
review64471002
2018-11-07 19:02:34 +01:00
Cédric Krier a6a7325f46 Remove deprecation warning
- remove invalid escape sequence
- use  read_file instead of read_fp
- use importlib instead of imp and __import__
- use callable instead of instance of collections.Callable
- fix silent file closing
- replace SafeConfigParser by ConfigParser
- replace decodestring by decodebytes
- replace encodestring by encodebytes

issue7666
issue7390
review53361004
2018-09-01 17:06:28 +02:00
Cédric Krier 507a06a107 Use sqlite3.backup when available
issue7212
review44131002
2018-08-06 19:05:44 +02:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier 7408bb8090 Simplify the creation of dependencies graph
There is no need to create the graph step by step with only dependencies
already registered as far as the depth computation is propagated to all the
children.
Instead of searching level by level the nodes to iterate, it is faster to use
the sort of Python.
create_graph does not need to return its internal states but only the graph.
The ir.module activate and update method does not need to check for missing
dependencies because it is already checked at startup.

issue7466
review45211002
2018-06-11 23:22:35 +02:00
Cédric Krier 9865cc43e6 Add test to check that depends on _parent_ contains also the relation
Otherwise, the depends decorator will set the relation to None if the record
is not in One2Many widget. And the method will not behave the same as if the
record was in a One2Many widget.
And if it is an on_change call, it will remove the value on the client side.

issue7249
review45291002
2018-03-24 13:50:47 +01:00
Sergi Almacellas Abellana ff2bded417 Ensure that all buttons are registered in ir.model.button
issue6389
review36621002
2018-03-01 11:59:23 +01:00
Sergi Almacellas Abellana 54f70e2971 Add depends on Button
issue6919
review40811002
2018-02-19 11:35:37 +01:00
Sergi Almacellas Abellana e0c016aaf8 Use diferent values for active_ids and active_id on action window tests
This allows to test all clauses of pattern used by relate windows

issue7028
review42991002
2017-12-22 12:26:06 +01:00
Sergi Almacellas Abellana cbf090cdb7 Complete ir_action_window test
Test search_value, context_domain and context model are correclty defined

issue6880
review43711002
2017-11-20 15:33:22 +01:00
Cédric Krier 291beaa10c Wait for the database accepting connection to run tests
issue6844
review43671002
2017-10-30 09:36:10 +01:00
Sergi Almacellas Abellana 520824b633 Take in account the modules filter when adding tests to all_suite
This was wrongly removed in changeset 2e73b7d8e1c6
issue6817
review44371002
2017-10-06 14:42:26 +02:00
Nicolas Évrard ba9cbab0de Allow to add tests in trytond through entry_points
issue6423
review35371002
2017-10-02 11:38:02 +02:00
Nicolas Évrard a6688da3d3 Add missing fields import removed by merge of changeset 6089dcb6076a 2017-09-28 19:27:02 +02:00
Nicolas Évrard 40d37f57bf Add test for ModelSingleton inheritance order
issue6629
review43261002
2017-09-28 18:40:39 +02:00
Cédric Krier 23828b8222 Ensure any connection is left open when dumping as template
issue6699
2017-08-17 19:08:51 +02:00
Cédric Krier 07d293caf8 Add support test database cache for remote postgresql
If pg_dump/pg_restore are not available, we create a copy of the database on
PostgreSQL server using the template option of "CREATE DATABASE". We still
create a file in the cache folder to know that there is a backup.

issue6699
2017-08-15 00:21:45 +02:00
Cédric Krier 965f8b0cdb Add test to ensure rec_name is a char, text type
Model.default_get with 'default_rec_name' context relies on the fact that
rec_name is a string base field.

issue6630
review36501002
2017-07-26 23:44:00 +02:00
Sergi Almacellas Abellana 6f8582d168 Pass pattern argument on multivalue default field test
This allows to catch all the multivalue default methods which miss the
pattern argument.
issue6658
review40541002
2017-07-25 09:45:12 +02:00
Cédric Krier fce24f3e4e Add test for function field methods
It tests if getter, setter and searcher really exists on the model.

issue6616
review34241002
2017-07-12 19:58:13 +02:00