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