summaryrefslogtreecommitdiff
path: root/addons/web/doc
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-10-26 10:45:43 +0200
committerXavier Morel <xmo@openerp.com>2012-10-26 10:45:43 +0200
commit04282ff00e8fa70c3eb0e9a48ba0cd32aa0e1cd7 (patch)
tree4750c6e5f62d2f20924807ef33a334c55c5be0f0 /addons/web/doc
parent99a2dd3938c7d7d4b7e9c724ec8acbb5eeedf35f (diff)
[IMP] port search test to new framework, add handling of web.{submodule} dependencies
bzr revid: xmo@openerp.com-20121026084543-fobkc3ta5q2jc3q6
Diffstat (limited to 'addons/web/doc')
-rw-r--r--addons/web/doc/testing.rst35
1 files changed, 29 insertions, 6 deletions
diff --git a/addons/web/doc/testing.rst b/addons/web/doc/testing.rst
index 34826201dc9..582960846e4 100644
--- a/addons/web/doc/testing.rst
+++ b/addons/web/doc/testing.rst
@@ -417,26 +417,49 @@ Actual RPC
Testing API
-----------
-.. todo:: implement options on sections
+.. js:function:: openerp.testing.section(name[, options], body)
+
+ :param String name:
+ :param TestOptions options:
+ :param body:
+ :type body: Function<:js:func:`~openerp.testing.case`, void>
+
+.. js:function:: openerp.testing.case(name[, options], callback)
+
+ :param String name:
+ :param TestOptions options:
+ :param callback:
+ :type callback: Function<instance, $, Function<String, Function, void>>
.. js:class:: TestOptions
the various options which can be passed to
:js:func:`~openerp.testing.section` or
- :js:func:`~openerp.testing.case`
+ :js:func:`~openerp.testing.case`. Except for
+ :js:attr:`~TestOptions.setup` and
+ :js:attr:`~TestOptions.teardown`, an option on
+ :js:func:`~openerp.testing.case` will overwrite the corresponding
+ option on :js:func:`~openerp.testing.section` so
+ e.g. :js:attr:`~TestOptions.rpc` can be set for a
+ :js:func:`~openerp.testing.section` and then differently set for
+ some :js:func:`~openerp.testing.case` of that
+ :js:func:`~openerp.testing.section`
.. js:attribute:: TestOptions.asserts
-
+
An integer, the number of assertions which should run during a
normal execution of the test. Mandatory for asynchronous tests.
-
+
.. js:attribute:: TestOptions.setup
- .. todo:: implement & document setup (async?)
+ Test case setup, run right before each test case. A section's
+ :js:func:`~TestOptions.setup` is run before the case's own, if
+ both are specified.
.. js:attribute:: TestOptions.teardown
- .. todo:: implement & document teardown (async?)
+ Test case teardown, a case's :js:func:`~TestOptions.teardown`
+ is run before the corresponding section if both are present.
.. js:attribute:: TestOptions.fail_on_rejection