Merge branch 'master' of https://github.com/odoo/odoo
[odoo/odoo.git] / addons / website_blog / tests / common.py
diff --git a/addons/website_blog/tests/common.py b/addons/website_blog/tests/common.py
new file mode 100644 (file)
index 0000000..9147d2a
--- /dev/null
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+from openerp.tests import common
+
+
+class TestWebsiteBlogCommon(common.TransactionCase):
+    def setUp(self):
+        super(TestWebsiteBlogCommon, self).setUp()
+
+        Users = self.env['res.users']
+
+        group_blog_manager_id = self.ref('base.group_document_user')
+        group_employee_id = self.ref('base.group_user')
+        group_public_id = self.ref('base.group_public')
+
+        self.user_employee = Users.with_context({'no_reset_password': True}).create({
+            'name': 'Armande Employee',
+            'login': 'armande',
+            'alias_name': 'armande',
+            'email': 'armande.employee@example.com',
+            'notify_email': 'none',
+            'groups_id': [(6, 0, [group_employee_id])]
+        })
+        self.user_blogmanager = Users.with_context({'no_reset_password': True}).create({
+            'name': 'Bastien BlogManager',
+            'login': 'bastien',
+            'alias_name': 'bastien',
+            'email': 'bastien.blogmanager@example.com',
+            'notify_email': 'none',
+            'groups_id': [(6, 0, [group_blog_manager_id, group_employee_id])]
+        })
+        self.user_public = Users.with_context({'no_reset_password': True}).create({
+            'name': 'Cedric Public',
+            'login': 'cedric',
+            'alias_name': 'cedric',
+            'email': 'cedric.public@example.com',
+            'notify_email': 'none',
+            'groups_id': [(6, 0, [group_public_id])]
+        })