[Checkins] SVN: zope.app.zopetop/trunk/ - fixed dependencies and test layer

Christian Theune ct at gocept.com
Sun Jun 3 08:49:27 EDT 2007


Log message for revision 76211:
   - fixed dependencies and test layer
  

Changed:
  U   zope.app.zopetop/trunk/buildout.cfg
  U   zope.app.zopetop/trunk/setup.py
  A   zope.app.zopetop/trunk/src/zope/app/zopetop/ftesting.zcml
  U   zope.app.zopetop/trunk/src/zope/app/zopetop/ftests.py

-=-
Modified: zope.app.zopetop/trunk/buildout.cfg
===================================================================
--- zope.app.zopetop/trunk/buildout.cfg	2007-06-03 12:45:19 UTC (rev 76210)
+++ zope.app.zopetop/trunk/buildout.cfg	2007-06-03 12:49:26 UTC (rev 76211)
@@ -5,4 +5,5 @@
 
 [test]
 recipe = zc.recipe.testrunner
-eggs = XXX
+eggs = zope.app.zopetop [test]
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Modified: zope.app.zopetop/trunk/setup.py
===================================================================
--- zope.app.zopetop/trunk/setup.py	2007-06-03 12:45:19 UTC (rev 76210)
+++ zope.app.zopetop/trunk/setup.py	2007-06-03 12:49:26 UTC (rev 76211)
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 setup(
-    name = '',
+    name = 'zope.app.zopetop',
     version = '0.1',
     author = 'Zope Corporation and Contributors',
     author_email = 'zope3-dev at zope.org',
@@ -11,6 +11,15 @@
     packages = find_packages('src'),
     namespace_packages = ['zope', 'zope.app'],
     package_dir = {'': 'src'},
-    install_requires = ['setuptools'],
+    install_requires = ['setuptools',
+                        'zope.interface',
+                        'zope.app.skins',
+                        'zope.app.basicskin',
+                        'zope.publisher',
+                        'zope.app.rotterdam'],
+    extras_require=dict(test=['zope.app.testing',
+                              'zope.app.zcmlfiles',
+                              'zope.app.securitypolicy',
+                              'zope.app.authentication']),
     zip_safe = False,
     )

Added: zope.app.zopetop/trunk/src/zope/app/zopetop/ftesting.zcml
===================================================================
--- zope.app.zopetop/trunk/src/zope/app/zopetop/ftesting.zcml	                        (rev 0)
+++ zope.app.zopetop/trunk/src/zope/app/zopetop/ftesting.zcml	2007-06-03 12:49:26 UTC (rev 76211)
@@ -0,0 +1,41 @@
+<configure
+  xmlns="http://namespaces.zope.org/zope"
+  i18n_domain="zope"
+  >
+
+  <!-- This file is the equivalent of site.zcml and it is -->
+  <!-- used for functional testing setup -->
+  <include package="zope.app.securitypolicy" file="meta.zcml"/>
+
+  <include package="zope.app.zcmlfiles" />
+  <include package="zope.app.authentication" />
+
+  <include package="zope.app.securitypolicy" />
+
+  <securityPolicy
+    component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+  <role id="zope.Manager" title="Site Manager" />
+
+  <grantAll role="zope.Manager" />
+  <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
+
+  <!-- Principal that tests generally run as -->
+  <principal
+    id="zope.mgr"
+    title="Manager"
+    login="mgr"
+    password="mgrpw" />
+
+  <!-- Bootstrap principal used to make local grant to the principal above -->
+  <principal
+    id="zope.globalmgr"
+    title="Manager"
+    login="globalmgr"
+    password="globalmgrpw" />
+
+  <grant role="zope.Manager" principal="zope.globalmgr" />
+
+  <include package="zope.app.zopetop" />
+
+</configure>

Modified: zope.app.zopetop/trunk/src/zope/app/zopetop/ftests.py
===================================================================
--- zope.app.zopetop/trunk/src/zope/app/zopetop/ftests.py	2007-06-03 12:45:19 UTC (rev 76210)
+++ zope.app.zopetop/trunk/src/zope/app/zopetop/ftests.py	2007-06-03 12:49:26 UTC (rev 76211)
@@ -13,25 +13,33 @@
 ##############################################################################
 """Functional Tests for `ZopeTop` skin.
 
-$Id: test_templatedpage.py,v 1.1.1.1 2004/02/18 18:07:08 srichter Exp $
+$Id$
 """
 __docformat__ = 'restructuredtext'
 import unittest
+import os
 
-from zope.app.testing.functional import BrowserTestCase
+from zope.app.testing.functional import ZCMLLayer, BrowserTestCase
 
+
+ZopeTopLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'ZopeTopLayer', allow_teardown=True)
+
 class ZopeTopSkinTests(BrowserTestCase):
     """Funcional tests for ZopeTop skin."""
 
+    layer = ZopeTopLayer
+
     def test_ZopeTopIsNotRotterdam(self):
         response1 = self.publish("/++skin++Rotterdam", basic='mgr:mgrpw')
         response2 = self.publish("/++skin++ZopeTop", basic='mgr:mgrpw')
         self.assert_(response1.getBody() != response2.getBody())
 
 def test_suite():
-    return unittest.TestSuite((
-        unittest.makeSuite(ZopeTopSkinTests),
-        ))
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(ZopeTopSkinTests))
+    return suite
 
 if __name__=='__main__':
     unittest.main(defaultTest='test_suite')



More information about the Checkins mailing list