common.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # -*- coding: utf-8 -*-
  2. from openerp.tests import common
  3. class TestWebsiteBlogCommon(common.TransactionCase):
  4. def setUp(self):
  5. super(TestWebsiteBlogCommon, self).setUp()
  6. Users = self.env['res.users']
  7. group_blog_manager_id = self.ref('base.group_document_user')
  8. group_employee_id = self.ref('base.group_user')
  9. group_public_id = self.ref('base.group_public')
  10. self.user_employee = Users.with_context({'no_reset_password': True}).create({
  11. 'name': 'Armande Employee',
  12. 'login': 'armande',
  13. 'alias_name': 'armande',
  14. 'email': 'armande.employee@example.com',
  15. 'notify_email': 'none',
  16. 'groups_id': [(6, 0, [group_employee_id])]
  17. })
  18. self.user_blogmanager = Users.with_context({'no_reset_password': True}).create({
  19. 'name': 'Bastien BlogManager',
  20. 'login': 'bastien',
  21. 'alias_name': 'bastien',
  22. 'email': 'bastien.blogmanager@example.com',
  23. 'notify_email': 'none',
  24. 'groups_id': [(6, 0, [group_blog_manager_id, group_employee_id])]
  25. })
  26. self.user_public = Users.with_context({'no_reset_password': True}).create({
  27. 'name': 'Cedric Public',
  28. 'login': 'cedric',
  29. 'alias_name': 'cedric',
  30. 'email': 'cedric.public@example.com',
  31. 'notify_email': 'none',
  32. 'groups_id': [(6, 0, [group_public_id])]
  33. })