Commit Graph
105 Commits
Author SHA1 Message Date
Cédric Krier 8a4ba59b2d Switch to WSGI API
issue4646
review20541003
2016-03-15 16:57:26 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier ae8975ede3 Add doctest checker for Python 2-3
2to3 doesn't convert unicode string of Python 2 into string of Python 3.
So we will use a special checker that remove the 'u' prefix when checking
output.

issue3211
review19911002
2016-02-24 22:00:06 +01:00
Cédric Krier 7ca5529e49 Use assertValid instead of assert_from lxml.etree.RelaxNG
2to3 convert assert_ into assertTrue but this method is not defined in lxml.
To avoid this conversion, we use assertValid.

issue5314
review21681002
2016-02-09 21:05:37 +01:00
Cédric Krier da1be07832 Make TestCase create and drop its database
and add with_transaction decorator.

issue5263
review20711002
2016-02-06 19:10:35 +01:00
Cédric Krier b8a6573cc7 Fix test_view to use the right model for inherited view
If the view inherit from a different model, it should be used for the test
instead of the inherited view.

issue5088
review18751002
2015-10-31 10:47:10 +01:00
Cédric Krier 87f9fbea6e Add test for all field methods
The test check if all defined field methods are linked to an existing field.

issue4991
review23441002
2015-10-01 22:37:13 +02:00
Cédric Krier 8299e1c133 Validate XML generated by ModelView.fields_view_get
- Add missing attributes to {form,tree}.rn{c,g}
- Add validatation to test_view
- Prevent fields_view_get to set attribute to the wrong view type

issue4944
review19421002
2015-09-04 12:04:07 +02:00
Cédric Krier 52ff97b165 Rename ir.module.module* into ir.module*
issue4764
review7171002
2015-05-28 21:02:01 +02:00
Cédric Krier a913a10d0f Add only fields define in context for read
instead of all the depend fields.

issue4401
review8111002
2015-04-11 13:35:28 -04:00
David Harper 746db84c8c Fix check if db_exist
issue4675
review8091002
2015-03-25 18:57:25 +01:00
Sergi Almacellas Abellana 637da8d22c Add generic test for workflow transitions
issue4160
review6171002
2015-03-20 21:46:15 +01:00
Cédric Krier 44693df703 Use separate test file for base modules
This allows to filter them with the command line option.

review9051002
2015-03-05 11:38:23 +01:00
Cédric Krier faa4bfe7d9 Add test on Model._rec_name
review9041002
2015-03-05 11:13:50 +01:00
Cédric Krier 0d3459f659 Add missing base module test cases 2015-02-27 12:29:38 +01:00
Cédric Krier 9fc9716d3e Add no-doctest option to run-test.py
Sometimes it is useful to quickly run only the unittest without the doctest.

review7871003
2015-01-29 12:29:40 +01:00
Cédric Krier cf74a7b509 test_depends should not fail if module doesn't register any model 2015-01-27 22:42:33 +01:00
Cédric Krier 50dfa3f7c5 Add check for default model access and add ModelTestCase
When group access exists, a default model access should be defined otherwise
all access are given to non group users.

issue4485
review5941002
2015-01-27 18:11:23 +01:00
Nicolas Évrard 5a74a88f97 Add test for access rights of menu and actions
issue4295
review12661002
2015-01-05 16:35:09 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Sergi Almacellas Abellana 4d1e2ba0c0 Use more fine grained exceptions on tests
issue3973
review8431002
2014-06-11 11:22:26 +02:00
Cédric Krier a6ffa18908 Add run-tests script and cleanup tests
issue2121
issue2420
review2491002
2014-01-12 19:58:22 +01:00
Cédric Krier c46a026c40 Refactore Transaction to add close and autocommit
review2151002
2013-12-18 18:09:43 +01:00
Cédric Krier 2b2001f1ca Force UTC as timezone
issue3444
review1411002
2013-11-15 02:26:58 +01:00
Cédric Krier 37cf65c71f Timezone must be set when running tests
review1139002
2013-10-15 17:48:25 +02:00
Cédric Krier fc6c6cfdda Migration to python-sql
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method

review1001002
2013-09-06 22:32:37 +02:00
Cédric Krier f27631161a Add test for unknown fields in test_depends
review745002
2013-03-27 22:47:06 +01:00
Cédric Krier a95ae0dad9 Remove _inherits
review670002
2013-03-20 22:49:16 +01:00
Cédric Krier 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +01:00
Cédric Krier 289eaac537 Add test for copy of One2Many 2013-02-04 20:03:18 +01:00
Cédric Krier 1e60085854 Use a better hashing method for context
repr doesn't guarantee to have always the same string

review642002
2013-02-04 19:59:05 +01:00
Albert Cervera i Areny 98164b445f Check depends of One2Many.add_remove
issue2931
review615002
2012-12-16 23:38:58 +01:00
Pierre-Louis Bonicoli 4e4fe87dfa Fix message when a required field is missing
issue2657
review399002
2012-10-09 11:08:56 +02:00
Cédric Krier c1d4aa7cfc Commit cursor after creation of wizard instance
Before running InstallUpgrade, the cursor must be committed to avoid
transactional dead lock.
2012-09-28 18:08:49 +02:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Emmanuelle Delescolle 6cd2e51aa3 Multi-level inherits search fix
Trytond now looks at the whole inherits hierarchy for fields when creating
search domain on ModelSQL objects instead of just looking at the direct parent.

issue1860
review369001
2012-05-16 15:48:00 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier be0e5c54a9 Simplify workflow engine
- Remove workflow module
- Add ir.model.button for access rights

review256001
2012-03-25 00:15:17 +01:00
Cédric Krier cd699fedd3 Remove states from test_depends
states doesn't need to be enforced and it can rely on the default values to
prevent loading lazy fields.

review284001
2012-03-12 22:31:15 +01:00
Cédric Krier 1cf1b01134 Don't use wizard session to install modules for tests
This prevents a circular lock when creating foreign key on ir_model_field
2012-01-11 18:02:49 +01:00
Cédric Krier 274ea7bee2 New wizard design
review167001
2012-01-02 17:48:17 +01:00
Cédric Krier 8b33421403 Use XML-RPC struct for Decimal and Date
review191006
2011-12-22 22:17:08 +01:00
Cédric Krier 7b498aab63 Fix Transaction.start to use keyword argument for context
review178005
2011-11-28 14:44:39 +01:00
Sharoon Thomas 09c48a5002 Fix unlean stopping of Transaction
Avoid unlean stop of transaction which occurs when an exception occurs in the start or stop method.
issue2256
review2256
2011-11-20 15:08:15 +05:30
Nicolas Évrard 0a471486e0 correct pyflake errors
review164003
2011-11-02 15:49:38 +01:00
Nathanael Perat d09c24a894 fixed -c option to test_tryton.py
issue 2121
review 154006
2011-10-31 14:54:13 +01:00
Cédric Krier 7689f3df45 Add missing worklow tests in suite 2011-10-26 15:21:01 +02:00
Nicolas Évrard a6fd85d181 merge 2011-08-11 16:13:27 +02:00
Cédric Krier 83b1f967a0 Add test for depends
review76002
2011-08-04 16:53:58 +02:00