Commit 370264d6 authored by Jérome Perrin's avatar Jérome Perrin

testDynamicLocalRole was disabled

remove the 'framework.py' code that we no longer use




git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12186 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c835daf2
...@@ -28,13 +28,8 @@ ...@@ -28,13 +28,8 @@
"""Tests ERP5 User Management. """Tests ERP5 User Management.
""" """
import os, sys
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
# Needed in order to have a log file inside the current folder import unittest
os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
os.environ['EVENT_LOG_SEVERITY'] = '-300'
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
get_request get_request
...@@ -308,8 +303,6 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -308,8 +303,6 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
The site category is not defined explictly the role, and will have the The site category is not defined explictly the role, and will have the
current site of the user. current site of the user.
""" """
return NotImplemented # FIXME: currently this test raises error
ti = self._getTypeInfo() ti = self._getTypeInfo()
ti.addRole(id='Assignor', description='desc.', ti.addRole(id='Assignor', description='desc.',
name='an Assignor role for testing', name='an Assignor role for testing',
...@@ -323,7 +316,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -323,7 +316,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
self.assertEquals(['Assignor'], obj.__ac_local_roles__.get('F1_G1_S1')) self.assertEquals(['Assignor'], obj.__ac_local_roles__.get('F1_G1_S1'))
self.failUnless('Assignor' in self.failUnless('Assignor' in
getSecurityManager().getUser().getRolesInContext(obj)) getSecurityManager().getUser().getRolesInContext(obj))
def testAcquireLocalRoles(self): def testAcquireLocalRoles(self):
"""Tests that document does not acquire loal roles from their parents if """Tests that document does not acquire loal roles from their parents if
"acquire local roles" is not checked.""" "acquire local roles" is not checked."""
...@@ -352,13 +345,9 @@ class TestLocalRoleManagement(ERP5TypeTestCase): ...@@ -352,13 +345,9 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
self.failIf('Assignor' in self.failIf('Assignor' in
getSecurityManager().getUser().getRolesInContext(obj)) getSecurityManager().getUser().getRolesInContext(obj))
if __name__ == '__main__': def test_suite():
framework() suite = unittest.TestSuite()
else: suite.addTest(unittest.makeSuite(TestUserManagement))
import unittest suite.addTest(unittest.makeSuite(TestLocalRoleManagement))
def test_suite(): return suite
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestUserManagement))
suite.addTest(unittest.makeSuite(TestLocalRoleManagement))
return suite
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