[FIX] portal: mail access right test is not totally accurate

The access right test expect an exception
to be raised when accessing any of the
followers, but this is not 100% correct,
as the test user (Chell) should be able to
read her own record.
This worked by chance because the ORM
prefetching was triggering an access error
whenever any follower was accessed, but
this was a bug, now fixed in server at
rev-id odo@openerp.com-20131119153700-5sbo2cl13vvqsgz5
revno 5136

bzr revid: odo@openerp.com-20131119175658-1nv5c9iwfizkrasc
This commit is contained in:
Olivier Dony 2013-11-19 18:56:58 +01:00
parent eaa917bef9
commit 2a209aa75d
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ class test_portal(TestMailBase):
for message in chell_pigs.message_ids:
trigger_read = message.subject
for partner in chell_pigs.message_follower_ids:
if partner.id == self.partner_chell_id:
# Chell can read her own partner record
continue
with self.assertRaises(except_orm):
trigger_read = partner.name