Browse Source

[IMP] Adding res.users chatter_position read/write test

pull/1066/head
QS5ELkMu 7 years ago
committed by Jairo Llopis
parent
commit
09e89832cd
No known key found for this signature in database GPG Key ID: 59564BF1E22F314F
  1. 1
      web_responsive/models/inherited_res_users.py
  2. 1
      web_responsive/tests/__init__.py
  3. 15
      web_responsive/tests/test_res_users.py

1
web_responsive/models/inherited_res_users.py

@ -12,7 +12,6 @@ class ResUsers(models.Model):
('sided', 'Sided'), ('sided', 'Sided'),
], string="Chatter Position", default='normal') ], string="Chatter Position", default='normal')
def __init__(self, pool, cr): def __init__(self, pool, cr):
""" Override of __init__ to add access rights. """ Override of __init__ to add access rights.
Access rights are disabled by default, but allowed on some specific Access rights are disabled by default, but allowed on some specific

1
web_responsive/tests/__init__.py

@ -1 +1,2 @@
from . import test_ui from . import test_ui
from . import test_res_users

15
web_responsive/tests/test_res_users.py

@ -0,0 +1,15 @@
# Copyright 2018 Alexandre Díaz
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.tests import common
class TestResUsers(common.TransactionCase):
def test_chatter_position_wr(self):
user_public = self.env.ref('base.public_user')
self.assertEqual(user_public.chatter_position, 'normal')
user_public.sudo(user_public).write({
'chatter_position': 'sided',
})
self.assertEqual(user_public.chatter_position, 'sided')
Loading…
Cancel
Save