Commit f7dfc5e9 authored by Mame Coumba Sall's avatar Mame Coumba Sall

Use self.portal.web_site_module instead of self.web_site_module

parent ec4852db
...@@ -1484,7 +1484,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1484,7 +1484,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_03_WebSection_getDocumentValueListSecurity(self): def test_03_WebSection_getDocumentValueListSecurity(self):
""" Test WebSection_getDocumentValueList behaviour and security""" """ Test WebSection_getDocumentValueList behaviour and security"""
self.login('admin') self.login('admin')
site = self.web_site_module.newContent(portal_type='Web Site', site = self.portal.web_site_module.newContent(portal_type='Web Site',
id='site') id='site')
site.publish() site.publish()
...@@ -1620,7 +1620,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1620,7 +1620,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_04_ExpireUserAction(self): def test_04_ExpireUserAction(self):
""" Test the expire user action""" """ Test the expire user action"""
self.login('admin') self.login('admin')
site = self.web_site_module.newContent(portal_type='Web Site', id='site') site = self.portal.web_site_module.newContent(portal_type='Web Site', id='site')
# create websections in a site and in anothers web sections # create websections in a site and in anothers web sections
section_1 = site.newContent(portal_type='Web Section', id='section_1') section_1 = site.newContent(portal_type='Web Section', id='section_1')
...@@ -1650,7 +1650,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1650,7 +1650,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_05_createWebSite(self): def test_05_createWebSite(self):
""" Test to create or clone web sites with many users """ """ Test to create or clone web sites with many users """
self.login('admin') self.login('admin')
web_site_module = self.web_site_module web_site_module = self.portal.web_site_module
# test for admin # test for admin
try: try:
...@@ -1673,7 +1673,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1673,7 +1673,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_06_createWebSection(self): def test_06_createWebSection(self):
""" Test to create or clone web sections with many users """ """ Test to create or clone web sections with many users """
self.login('admin') self.login('admin')
site = self.web_site_module.newContent(portal_type='Web Site', id='site') site = self.portal.web_site_module.newContent(portal_type='Web Site', id='site')
# test for admin # test for admin
try: try:
...@@ -1818,7 +1818,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1818,7 +1818,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
project.validate() project.validate()
self.stepTic() self.stepTic()
website = self.web_site_module.newContent(portal_type='Web Site', website = self.portal.web_site_module.newContent(portal_type='Web Site',
id='site') id='site')
website.publish() website.publish()
website.setMembershipCriterionBaseCategory('follow_up') website.setMembershipCriterionBaseCategory('follow_up')
...@@ -1856,7 +1856,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase): ...@@ -1856,7 +1856,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
Test that by default Anonymous User cannot access Web Site Module Test that by default Anonymous User cannot access Web Site Module
""" """
self.logout() self.logout()
self.assertRaises(Unauthorized, self.web_site_module.view) self.assertRaises(Unauthorized, self.portal.web_site_module.view)
class TestERP5WebCategoryPublicationWorkflow(ERP5TypeTestCase): class TestERP5WebCategoryPublicationWorkflow(ERP5TypeTestCase):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment