[Checkins] SVN: z3c.testing/trunk/ hopefully fixed the ioerror issue

Bernd Dorn bernd.dorn at lovelysystems.com
Tue May 29 05:28:13 EDT 2007


Log message for revision 75988:
  hopefully fixed the ioerror issue

Changed:
  U   z3c.testing/trunk/buildout.cfg
  U   z3c.testing/trunk/setup.py
  U   z3c.testing/trunk/src/z3c/testing/BROWSER.txt
  U   z3c.testing/trunk/src/z3c/testing/ftests.py
  U   z3c.testing/trunk/src/z3c/testing/layer.py
  U   z3c.testing/trunk/src/z3c/testing/test.zcml

-=-
Modified: z3c.testing/trunk/buildout.cfg
===================================================================
--- z3c.testing/trunk/buildout.cfg	2007-05-29 08:34:15 UTC (rev 75987)
+++ z3c.testing/trunk/buildout.cfg	2007-05-29 09:28:13 UTC (rev 75988)
@@ -1,5 +1,5 @@
 [buildout]
-develop = . 
+develop = . ../ZODB ../zope.app.testing
 parts = test
 
 [test]

Modified: z3c.testing/trunk/setup.py
===================================================================
--- z3c.testing/trunk/setup.py	2007-05-29 08:34:15 UTC (rev 75987)
+++ z3c.testing/trunk/setup.py	2007-05-29 09:28:13 UTC (rev 75988)
@@ -15,6 +15,8 @@
       package_dir = {'':'src'},
       namespace_packages=['z3c',],
       extras_require=dict(test=['zope.app.zcmlfiles',
+                                'zope.testbrowser',
+                                'zope.app.securitypolicy',
                                 ]),
       install_requires = ['setuptools',
                           'ZODB3',

Modified: z3c.testing/trunk/src/z3c/testing/BROWSER.txt
===================================================================
--- z3c.testing/trunk/src/z3c/testing/BROWSER.txt	2007-05-29 08:34:15 UTC (rev 75987)
+++ z3c.testing/trunk/src/z3c/testing/BROWSER.txt	2007-05-29 09:28:13 UTC (rev 75988)
@@ -1,3 +1,10 @@
 =========
  Browser
 =========
+
+  >>> from zope.testbrowser.testing import Browser
+  >>> browser = Browser()
+  >>> browser.handleErrors = False
+  >>> browser.open('http://localhost/++skin++Rotterdam/index.html')
+  >>> browser.url
+  'http://localhost/++skin++Rotterdam/index.html'

Modified: z3c.testing/trunk/src/z3c/testing/ftests.py
===================================================================
--- z3c.testing/trunk/src/z3c/testing/ftests.py	2007-05-29 08:34:15 UTC (rev 75987)
+++ z3c.testing/trunk/src/z3c/testing/ftests.py	2007-05-29 09:28:13 UTC (rev 75988)
@@ -2,8 +2,15 @@
 from zope.app.testing import functional
 import unittest
 
-layer.defineLayer('MyLayer', zcml='test.zcml')
+def appSetUp(app):
+    # just some stupid assertion
+    assert(app.__name__ is None)
 
+
+layer.defineLayer('MyLayer', zcml='test.zcml',
+                  appSetUp=appSetUp, clean=True)
+
+
 def test_suite():
     suite = unittest.TestSuite()
     suites = (

Modified: z3c.testing/trunk/src/z3c/testing/layer.py
===================================================================
--- z3c.testing/trunk/src/z3c/testing/layer.py	2007-05-29 08:34:15 UTC (rev 75987)
+++ z3c.testing/trunk/src/z3c/testing/layer.py	2007-05-29 09:28:13 UTC (rev 75988)
@@ -32,7 +32,7 @@
 
 class BufferedDatabaseTestLayer(object):
     """A test layer which creates a filestorage database.
-    
+
     The created database is later used without the need to run through the
     setup again.
     This speeds up functional tests.
@@ -56,7 +56,7 @@
     def setUpApplication(self, app):
         # to be overridden by subclass
         pass
-        
+
     def setUp(self):
         if not os.path.exists(self.dbDir):
             os.mkdir(self.dbDir)
@@ -76,7 +76,9 @@
             db.close()
 
         fsetup.base_storage = FileStorage(filename)
-        fsetup.setUp()
+        #hm, somehow the setup closes the database, but we dont want
+        #this.
+        #fsetup.setUp()
 
     def tearDown(self):
         fsetup = functional.FunctionalTestSetup(self.config_file)

Modified: z3c.testing/trunk/src/z3c/testing/test.zcml
===================================================================
--- z3c.testing/trunk/src/z3c/testing/test.zcml	2007-05-29 08:34:15 UTC (rev 75987)
+++ z3c.testing/trunk/src/z3c/testing/test.zcml	2007-05-29 09:28:13 UTC (rev 75988)
@@ -1,6 +1,9 @@
 <configure
     xmlns="http://namespaces.zope.org/zope"
     xmlns:zcml="http://namespaces.zope.org/zcml">
+
+  <include package="zope.app.securitypolicy" file="meta.zcml" />
+
   <include
       zcml:condition="installed zope.app.zcmlfiles"
       package="zope.app.zcmlfiles"
@@ -9,4 +12,16 @@
       zcml:condition="not-installed zope.app.zcmlfiles"
       package="zope.app"
       />
+
+  <include package="zope.app.securitypolicy" />
+  <securityPolicy
+      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+  
+  <unauthenticatedPrincipal
+    id="zope.anybody"
+    title="Unauthenticated User" />
+
+  <grant permission="zope.View"
+         principal="zope.anybody" />
+
 </configure>



More information about the Checkins mailing list