API¶
destral.openerp¶
-
destral.openerp.
DEFAULT_USER
= 1¶ Default user id
destral.patch¶
-
class
destral.patch.
PatchNewCursors
[source]¶ Util to patch creation of new cursor.
This will always return the cursor created by Transaction
destral.testing¶
-
class
destral.testing.
OOTestCase
(methodName='runTest')[source]¶ Base class to inherit test cases from for OpenERP Testing Framework.
-
database
¶ Database used in the test.
-
require_demo_data
= False¶ Require demo data to run the tests.
-
destral.transaction¶
-
class
destral.transaction.
Singleton
(mcs, name, bases, dict_)[source]¶ Metaclass for singleton pattern.
Copyright: Tryton Project
destral.utils¶
-
destral.utils.
update_config
(config, **kwargs)[source]¶ Updates config dictionary from keyword arguments.
-
destral.utils.
detect_module
(path)[source]¶ Detect if a path is part of a openerp module or not
Parameters: path – to examine Returns: None if is not a module or the module name
-
destral.utils.
module_exists
(module)[source]¶ Check if a python module exists.
This is used to check if a module have its own tests defined, Eg: addons.module_name.tests
Parameters: module – Module name to check Returns: True if exists or False if not
-
destral.utils.
get_dependencies
(module, addons_path=None, deps=None)[source]¶ Get all the dependencies of a module without database
Using __terp__.py files and is used to check requirements.txt in the dependencies.
Parameters: - module – Module to find the dependencies
- addons_path – Path to find the modules
Returns: a listt of dependencies.