diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2011-12-01 15:00:12 +0100 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2011-12-01 15:00:12 +0100 |
| commit | 43745c4cb9653f40f72a261da655caa4dabe40e7 (patch) | |
| tree | 0e2ad88febbaf91232f1a232d707ada8935320cf /tests/addons/test_exceptions/models.py | |
| parent | 596b904c51d8ca4b93c643357c6c6b50851dbd71 (diff) | |
[IMP] tests: moved tests into openerp.tests, expose test suites.
bzr revid: vmt@openerp.com-20111201140012-y9kmto0le0ugxdzf
Diffstat (limited to 'tests/addons/test_exceptions/models.py')
| -rw-r--r-- | tests/addons/test_exceptions/models.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/addons/test_exceptions/models.py b/tests/addons/test_exceptions/models.py deleted file mode 100644 index 45f0e6dbd47..00000000000 --- a/tests/addons/test_exceptions/models.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import openerp - -class m(openerp.osv.osv.Model): - """ This model exposes a few methods that will raise the different - exceptions that must be handled by the server (and its RPC layer) - and the clients. - """ - _name = 'test.exceptions.model' - - def generate_except_osv(self, cr, uid, ids, context=None): - # title is ignored in the new (6.1) exceptions - raise openerp.osv.osv.except_osv('title', 'description') - - def generate_except_orm(self, cr, uid, ids, context=None): - # title is ignored in the new (6.1) exceptions - raise openerp.osv.orm.except_orm('title', 'description') - - def generate_warning(self, cr, uid, ids, context=None): - raise openerp.exceptions.Warning('description') - - def generate_access_denied(self, cr, uid, ids, context=None): - raise openerp.exceptions.AccessDenied() - - def generate_access_error(self, cr, uid, ids, context=None): - raise openerp.exceptions.AccessError('description') - - def generate_exc_access_denied(self, cr, uid, ids, context=None): - raise Exception('AccessDenied') - - def generate_undefined(self, cr, uid, ids, context=None): - self.surely_undefined_sumbol -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
