[Checkins] SVN: buddydemo/trunk/ - on the way to a functioning buildout

Christian Theune ct at gocept.com
Tue Jun 5 10:11:30 EDT 2007


Log message for revision 76376:
   - on the way to a functioning buildout
  

Changed:
  U   buddydemo/trunk/buildout.cfg
  U   buddydemo/trunk/setup.py
  A   buddydemo/trunk/src/buddydemo/ftesting.zcml
  U   buddydemo/trunk/src/buddydemo/ftests.py

-=-
Modified: buddydemo/trunk/buildout.cfg
===================================================================
--- buddydemo/trunk/buildout.cfg	2007-06-05 13:38:24 UTC (rev 76375)
+++ buddydemo/trunk/buildout.cfg	2007-06-05 14:11:29 UTC (rev 76376)
@@ -5,4 +5,5 @@
 
 [test]
 recipe = zc.recipe.testrunner
-eggs = XXX
+eggs = buddydemo [test]
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Modified: buddydemo/trunk/setup.py
===================================================================
--- buddydemo/trunk/setup.py	2007-06-05 13:38:24 UTC (rev 76375)
+++ buddydemo/trunk/setup.py	2007-06-05 14:11:29 UTC (rev 76376)
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 
 setup(
-    name = '',
+    name = 'buddydemo',
     version = '0.1',
     author = 'Zope Corporation and Contributors',
     author_email = 'zope3-dev at zope.org',
@@ -9,8 +9,20 @@
     license = 'ZPL 2.1',
 
     packages = find_packages('src'),
-    namespace_packages = ['zope', 'zope.app'],
     package_dir = {'': 'src'},
-    install_requires = ['setuptools'],
+    install_requires = ['setuptools',
+                        'zope.interface',
+                        'zope.event',
+                        'zope.lifecycleevent',
+                        'ZODB3',
+                        'zope.app.zapi',
+                        'zope.app.container',
+                        'zope.component',
+                        'zope.publisher',
+                        'zope.schema',
+                       ],
+    extras_require=dict(test=['zope.app.testing',
+                              'zope.app.zcmlfiles',
+                              'zope.app.securitypolicy']),
     zip_safe = False,
     )

Added: buddydemo/trunk/src/buddydemo/ftesting.zcml
===================================================================
--- buddydemo/trunk/src/buddydemo/ftesting.zcml	                        (rev 0)
+++ buddydemo/trunk/src/buddydemo/ftesting.zcml	2007-06-05 14:11:29 UTC (rev 76376)
@@ -0,0 +1,41 @@
+<configure
+   xmlns="http://namespaces.zope.org/zope"
+   xmlns:meta="http://namespaces.zope.org/meta"
+   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" />
+  <include package="buddydemo"/>
+
+  <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" />
+
+</configure>

Modified: buddydemo/trunk/src/buddydemo/ftests.py
===================================================================
--- buddydemo/trunk/src/buddydemo/ftests.py	2007-06-05 13:38:24 UTC (rev 76375)
+++ buddydemo/trunk/src/buddydemo/ftests.py	2007-06-05 14:11:29 UTC (rev 76376)
@@ -1,9 +1,16 @@
 import unittest
+import os
 from buddydemo.buddy import Buddy
-from zope.app.testing.functional import BrowserTestCase
+from zope.app.testing.functional import BrowserTestCase, ZCMLLayer
 
+BuddyDemoLayer = ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'BuddyDemoLayer', allow_teardown=True)
+
 class Test(BrowserTestCase):
 
+    layer = BuddyDemoLayer
+
     def setUp(self):
         BrowserTestCase.setUp(self)
         self.bob = Buddy('Bob', 'Smith', 'bob at smith.org',



More information about the Checkins mailing list