[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ContentDirective/tests - testDirectives.py:1.7 testFactory.py:1.7
Jim Fulton
jim@zope.com
Tue, 13 Aug 2002 13:46:43 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/ContentDirective/tests
In directory cvs.zope.org:/tmp/cvs-serv18338/lib/python/Zope/App/ContentDirective/tests
Modified Files:
testDirectives.py testFactory.py
Log Message:
Introduced a system user
(Zope.Security.SecurityManagement.system_user)
that has all permissions. This was necessary so startup code and
testing code can avoid authorization failures.
=== Zope3/lib/python/Zope/App/ContentDirective/tests/testDirectives.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/App/ContentDirective/tests/testDirectives.py:1.6 Sun Jun 23 13:03:40 2002
+++ Zope3/lib/python/Zope/App/ContentDirective/tests/testDirectives.py Tue Aug 13 13:46:12 2002
@@ -24,7 +24,7 @@
from Zope.Configuration.xmlconfig import xmlconfig, XMLConfig
from Zope.Configuration.xmlconfig import ZopeXMLConfigurationError
from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
-
+from Zope.Security.SecurityManagement import newSecurityManager, system_user
import Zope.App.ComponentArchitecture
import Zope.App.Security
import Zope.App.ContentDirective
@@ -44,6 +44,7 @@
class TestContentDirective(PlacelessSetup, unittest.TestCase):
def setUp(self):
PlacelessSetup.setUp(self)
+ newSecurityManager(system_user)
XMLConfig('meta.zcml', Zope.App.ContentDirective)()
XMLConfig('meta.zcml', Zope.App.Security)()
@@ -100,6 +101,7 @@
class TestFactorySubdirective(PlacelessSetup, unittest.TestCase):
def setUp(self):
PlacelessSetup.setUp(self)
+ newSecurityManager(system_user)
XMLConfig('meta.zcml', Zope.App.ContentDirective)()
XMLConfig('meta.zcml', Zope.App.Security)()
=== Zope3/lib/python/Zope/App/ContentDirective/tests/testFactory.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/App/ContentDirective/tests/testFactory.py:1.6 Sun Jun 23 13:03:40 2002
+++ Zope3/lib/python/Zope/App/ContentDirective/tests/testFactory.py Tue Aug 13 13:46:12 2002
@@ -21,6 +21,7 @@
from Zope.Configuration.xmlconfig import xmlconfig, ZopeXMLConfigurationError
from Zope.Configuration.xmlconfig import XMLConfig
from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.Security.SecurityManagement import newSecurityManager, system_user
import Zope.App.Security
from Zope.App.Security.Exceptions import UndefinedPermissionError
@@ -39,6 +40,7 @@
class Test(PlacelessSetup, unittest.TestCase):
def setUp(self):
PlacelessSetup.setUp(self)
+ newSecurityManager(system_user)
XMLConfig('meta.zcml', Zope.App.ContentDirective)()
XMLConfig('meta.zcml', Zope.App.Security)()