From 370264d6ec7d64f47e4a8dac46c50320a7ba1989 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 22 Jan 2007 10:46:12 +0000
Subject: [PATCH] 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
---
 .../ERP5Security/tests/testERP5Security.py    | 25 ++++++-------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/product/ERP5Security/tests/testERP5Security.py b/product/ERP5Security/tests/testERP5Security.py
index de722d08fd..9996009005 100644
--- a/product/ERP5Security/tests/testERP5Security.py
+++ b/product/ERP5Security/tests/testERP5Security.py
@@ -28,13 +28,8 @@
 
 """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
-os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
-os.environ['EVENT_LOG_SEVERITY'] = '-300'
+import unittest
 
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
                                                      get_request
@@ -308,8 +303,6 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
     The site category is not defined explictly the role, and will have the
     current site of the user.
     """
-    return NotImplemented # FIXME: currently this test raises error
-                           
     ti = self._getTypeInfo()
     ti.addRole(id='Assignor', description='desc.',
            name='an Assignor role for testing',
@@ -323,7 +316,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
     self.assertEquals(['Assignor'], obj.__ac_local_roles__.get('F1_G1_S1'))
     self.failUnless('Assignor' in
             getSecurityManager().getUser().getRolesInContext(obj))
-  
+
   def testAcquireLocalRoles(self):
     """Tests that document does not acquire loal roles from their parents if
     "acquire local roles" is not checked."""
@@ -352,13 +345,9 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
     self.failIf('Assignor' in
             getSecurityManager().getUser().getRolesInContext(obj))
     
-if __name__ == '__main__':
-  framework()
-else:
-  import unittest
-  def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(TestUserManagement))
-    suite.addTest(unittest.makeSuite(TestLocalRoleManagement))
-    return suite
+def test_suite():
+  suite = unittest.TestSuite()
+  suite.addTest(unittest.makeSuite(TestUserManagement))
+  suite.addTest(unittest.makeSuite(TestLocalRoleManagement))
+  return suite
 
-- 
2.30.9