summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-12-07 10:43:56 +0100
committerChristophe Matthieu <chm@openerp.com>2012-12-07 10:43:56 +0100
commitb0d96bf4e76a5566fd20c6b2db6459a950f69a89 (patch)
tree342ca8cac0016185d3ad420274bc79184f7fd66b
parent217d83f7104c2d0bc9b1a7a29bab3008cb2f2feb (diff)
[IMP]mail: suppress compare value for testing of access rights
bzr revid: chm@openerp.com-20121207094356-d34o92weyivzfpde
-rw-r--r--addons/mail/tests/test_mail_access_rights.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/addons/mail/tests/test_mail_access_rights.py b/addons/mail/tests/test_mail_access_rights.py
index e110afc6b09..717a4cf26e3 100644
--- a/addons/mail/tests/test_mail_access_rights.py
+++ b/addons/mail/tests/test_mail_access_rights.py
@@ -211,30 +211,19 @@ class test_mail_access_rights(test_mail_mockup.TestMailMockups):
user_raoul_id, user_raoul, partner_raoul = self.user_raoul_id, self.user_raoul, self.user_raoul.partner_id
user_bert_id, user_bert, partner_bert = self.user_bert_id, self.user_bert, self.user_bert.partner_id
- name = 'Doc group'
- name2 = 'Doc group 2'
-
# Raoul create a document mail_group
- group_doc_id = self.mail_group.create(cr, user_raoul_id, {'name': name})
+ group_doc_id = self.mail_group.create(cr, user_raoul_id, {'name': 'Doc group'})
group_doc = self.mail_group.browse(cr, user_raoul_id, group_doc_id)
-
- # Test: raoul is follower of the group he created
- self.assertEqual(set(group_doc.message_follower_ids), set([partner_raoul]), 'Create failed, the creator must follow the document he created.')
-
# Test: raoul can modify the group
- self.mail_group.write(cr, user_raoul_id, [group_doc_id], {'name': name2})
- self.assertEqual(group_doc.name, name2, 'Write failed, the followers can modify the group.')
-
+ self.mail_group.write(cr, user_raoul_id, [group_doc_id], {'name': 'Doc group 2'})
# Test: bert try to modify the group but must raise
self.assertRaises(except_orm,
self.mail_group.write,
- cr, user_bert_id, [group_doc_id], {'name': name2})
-
+ cr, user_bert_id, [group_doc_id], {'name': 'Doc group 3'})
# Test: bert try to unlink the group but must raise
self.assertRaises(except_orm,
self.mail_group.unlink,
cr, user_bert_id, [group_doc_id])
-
# Test: bert can unlink the group
self.mail_group.unlink(cr, user_raoul_id, [group_doc_id])
- self.assertFalse(self.mail_group.search(cr, user_raoul_id, [["id", "=", group_doc_id]]), 'Unlink failed, the followers can unlink the group.')
+ \ No newline at end of file