[Zope-Checkins] SVN: Products.Five/branches/1.4/ Setup basic
modules for testing registerpackage functionality.
Rocky Burt
rocky at serverzen.com
Sun Mar 12 14:41:32 EST 2006
Log message for revision 65926:
Setup basic modules for testing registerpackage functionality.
Changed:
_U Products.Five/branches/1.4/
A Products.Five/branches/1.4/tests/test_registerpackage.py
A Products.Five/branches/1.4/tests/testing/pythonproduct1.py
-=-
Property changes on: Products.Five/branches/1.4
___________________________________________________________________
Name: svk:merge
- 98c0701e-2f07-0410-a1a0-c1bc72243522:/local/Products.Five/branches/1.4:8740
+ 98c0701e-2f07-0410-a1a0-c1bc72243522:/local/Products.Five/branches/1.4:8741
Added: Products.Five/branches/1.4/tests/test_registerpackage.py
===================================================================
--- Products.Five/branches/1.4/tests/test_registerpackage.py 2006-03-12 19:40:39 UTC (rev 65925)
+++ Products.Five/branches/1.4/tests/test_registerpackage.py 2006-03-12 19:41:31 UTC (rev 65926)
@@ -0,0 +1,56 @@
+##############################################################################
+#
+# Copyright (c) 2004, 2005 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.
+#
+##############################################################################
+"""Unit tests for the registerPackage directive.
+
+$Id$
+"""
+import os, sys
+if __name__ == '__main__':
+ execfile(os.path.join(sys.path[0], 'framework.py'))
+
+def test_registerPackage():
+ """
+ Testing registerPackage
+
+ >>> from zope.app.testing.placelesssetup import setUp, tearDown
+ >>> setUp()
+ >>> import Products
+ >>> import Products.Five
+ >>> from Products.Five import zcml
+
+ Use the five:registerPackage directive::
+
+ >>> configure_zcml = '''
+ ... <configure
+ ... xmlns="http://namespaces.zope.org/zope"
+ ... xmlns:five="http://namespaces.zope.org/five"
+ ... i18n_domain="foo">
+ ... <five:registerPackage
+ ... package="Products.Five.tests.testing.pythonproduct1"
+ ... />
+ ... </configure>'''
+ >>> zcml.load_config('meta.zcml', Products.Five)
+ >>> zcml.load_string(configure_zcml)
+
+ Clean up:
+
+ >>> tearDown()
+ """
+
+def test_suite():
+ from Testing.ZopeTestCase import ZopeDocTestSuite
+ return ZopeDocTestSuite()
+
+if __name__ == '__main__':
+ framework()
Added: Products.Five/branches/1.4/tests/testing/pythonproduct1.py
===================================================================
--- Products.Five/branches/1.4/tests/testing/pythonproduct1.py 2006-03-12 19:40:39 UTC (rev 65925)
+++ Products.Five/branches/1.4/tests/testing/pythonproduct1.py 2006-03-12 19:41:31 UTC (rev 65926)
@@ -0,0 +1,18 @@
+##############################################################################
+#
+# Copyright (c) 2004, 2005 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.
+#
+##############################################################################
+"""Python
+
+$Id$
+"""
+
More information about the Zope-Checkins
mailing list