diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2013-07-31 17:11:04 +0200 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2013-07-31 17:11:04 +0200 |
| commit | 07f5e9a4d64fcd8ae33303ff6c367c587d3c6e61 (patch) | |
| tree | 8a6fc012eab86225f8cbf6e20cead201eab69b0e | |
| parent | 3d1d7ee39cd9e82c0499af533ae1e1553c4e3b0a (diff) | |
[REM] workflows: removed temporary run.py script from the tests.
bzr revid: vmt@openerp.com-20130731151104-mxo8qu5x12krto0h
| -rwxr-xr-x | openerp/tests/addons/test_workflow/run.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/openerp/tests/addons/test_workflow/run.py b/openerp/tests/addons/test_workflow/run.py deleted file mode 100755 index dda955f9ce9..00000000000 --- a/openerp/tests/addons/test_workflow/run.py +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env python2 -import os - -import openerp -from openerp import SUPERUSER_ID - -DATABASE='t' - -def configure(): - conf = openerp.tools.config - conf['addons_path'] = os.path.join(os.path.dirname(os.path.dirname(__file__))) + ",/home/thu/repos/web/trunk/addons" - conf['log_handler'] = [':CRITICAL'] - openerp.modules.module.initialize_sys_path() - openerp.netsvc.init_logger() - -if __name__ == '__main__': - configure() - - print '> Loading registry `%s`...' % DATABASE - registry = registry = openerp.registry(DATABASE) - cr = registry.db.cursor() - print '< Registry `%s` loaded.' % DATABASE - - model = registry['test.workflow.model'] - trigger = registry['test.workflow.trigger'] - - print '> Creating new record...' - i = model.create(cr, SUPERUSER_ID, {}) - print '< Record created with ID %s' % i - - print '> Calling signal `a-b`...' - model.signal_workflow(cr, SUPERUSER_ID, [i], 'a-b') - print '< Signal `a-b` called.' - - print '> Triggering associated record...' - model.trigger(cr, SUPERUSER_ID, [i]) - print '< Associated record triggered.' - - print '> Triggering associated record (this time with the condition evaluating to True)...' - trigger.write(cr, SUPERUSER_ID, [1], {'value': True}) - model.trigger(cr, SUPERUSER_ID) - print '< Associated record triggered.' - - cr.close() |
