diff options
| author | Frédéric van der Essen <fva@openerp.com> | 2013-10-30 15:59:03 +0100 |
|---|---|---|
| committer | Frédéric van der Essen <fva@openerp.com> | 2013-10-30 15:59:03 +0100 |
| commit | 7a991fbb462bf9bc00367dfb69b2bc6d9e6d7df8 (patch) | |
| tree | 0d09540a5b7f714c597c59209a6085240d5d23e7 /addons/note/tests/test_note.py | |
| parent | d6ae4209e4ef1e248fbc15d8febae761c27a7790 (diff) | |
| parent | 34564de66de6c3fa343a044d87e6a140f970a4f6 (diff) | |
[MERGE] from trunk
bzr revid: fva@openerp.com-20131030145903-wux05uymt1yfryq4
Diffstat (limited to 'addons/note/tests/test_note.py')
| -rw-r--r-- | addons/note/tests/test_note.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/addons/note/tests/test_note.py b/addons/note/tests/test_note.py new file mode 100644 index 00000000000..4300009981e --- /dev/null +++ b/addons/note/tests/test_note.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from openerp.tests import common + +class TestNote(common.TransactionCase): + + def test_bug_lp_1156215(self): + """ensure any users can create new users""" + cr, uid = self.cr, self.uid + IMD = self.registry('ir.model.data') + Users = self.registry('res.users') + + _, demo_user = IMD.get_object_reference(cr, uid, 'base', 'user_demo') + _, group_id = IMD.get_object_reference(cr, uid, 'base', 'group_erp_manager') + + Users.write(cr, uid, [demo_user], { + 'groups_id': [(4, group_id)], + }) + + # must not fail + Users.create(cr, demo_user, { + 'name': 'test bug lp:1156215', + 'login': 'lp_1156215', + }) |
