[Checkins] SVN: Zope3/trunk/src/zope/app/intid/ Added IntIdLayer to
existing ftests.
Baiju M
baiju.m.mail at gmail.com
Sat Feb 3 03:33:02 EST 2007
Log message for revision 72344:
Added IntIdLayer to existing ftests.
Changed:
U Zope3/trunk/src/zope/app/intid/browser/ftests.py
A Zope3/trunk/src/zope/app/intid/ftesting.zcml
U Zope3/trunk/src/zope/app/intid/ftests.py
A Zope3/trunk/src/zope/app/intid/testing.py
-=-
Modified: Zope3/trunk/src/zope/app/intid/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/intid/browser/ftests.py 2007-02-03 06:04:09 UTC (rev 72343)
+++ Zope3/trunk/src/zope/app/intid/browser/ftests.py 2007-02-03 08:33:00 UTC (rev 72344)
@@ -17,11 +17,12 @@
"""
import unittest
from zope.app.testing import functional
+from zope.app.intid.testing import IntIdLayer
def test_suite():
- return unittest.TestSuite((
- functional.FunctionalDocFileSuite('tracking.txt'),
- ))
+ tracking = functional.FunctionalDocFileSuite('tracking.txt')
+ tracking.layer = IntIdLayer
+ return unittest.TestSuite((tracking,))
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
Added: Zope3/trunk/src/zope/app/intid/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/intid/ftesting.zcml 2007-02-03 06:04:09 UTC (rev 72343)
+++ Zope3/trunk/src/zope/app/intid/ftesting.zcml 2007-02-03 08:33:00 UTC (rev 72344)
@@ -0,0 +1,52 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zope"
+ package="zope.app.intid"
+ >
+
+ <!-- This file is the equivalent of site.zcml and it is -->
+ <!-- used for functional testing setup -->
+
+ <include package="zope.app.zcmlfiles" />
+
+ <include package="zope.app.securitypolicy" />
+ <include package="zope.app.securitypolicy" file="meta.zcml" />
+ <include package="zope.formlib" />
+ <include package="zope.app.authentication" />
+ <include package="zope.app.keyreference" />
+ <include package="zope.app.intid" />
+
+ <securityPolicy
+ component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+ <role id="zope.Anonymous" title="Everybody"
+ description="All users have this role implicitly" />
+ <role id="zope.Manager" title="Site Manager" />
+
+ <grantAll role="zope.Manager" />
+ <include package="zope.app.securitypolicy.tests" file="functional.zcml" />
+
+ <!-- Principals -->
+
+ <unauthenticatedGroup
+ id="zope.Anybody"
+ title="Unauthenticated Users"
+ />
+
+ <!-- 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>
Property changes on: Zope3/trunk/src/zope/app/intid/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: Zope3/trunk/src/zope/app/intid/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/intid/ftests.py 2007-02-03 06:04:09 UTC (rev 72343)
+++ Zope3/trunk/src/zope/app/intid/ftests.py 2007-02-03 08:33:00 UTC (rev 72344)
@@ -22,8 +22,8 @@
from zope.app import zapi
from zope.app.testing import ztapi, setup
from zope.app.testing.functional import BrowserTestCase
+from zope.app.intid.testing import IntIdLayer
-
class TestIntIds(BrowserTestCase):
def setUp(self):
@@ -80,6 +80,7 @@
def test_suite():
suite = unittest.TestSuite()
+ TestIntIds.layer = IntIdLayer
suite.addTest(unittest.makeSuite(TestIntIds))
return suite
Added: Zope3/trunk/src/zope/app/intid/testing.py
===================================================================
--- Zope3/trunk/src/zope/app/intid/testing.py 2007-02-03 06:04:09 UTC (rev 72343)
+++ Zope3/trunk/src/zope/app/intid/testing.py 2007-02-03 08:33:00 UTC (rev 72344)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""zope.app.intid common test related classes/functions/objects.
+
+$Id$
+"""
+
+__docformat__ = "reStructuredText"
+
+import os
+from zope.app.testing.functional import ZCMLLayer
+
+IntIdLayer = ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'IntIdLayer', allow_teardown=True)
+
Property changes on: Zope3/trunk/src/zope/app/intid/testing.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
More information about the Checkins
mailing list