[Checkins] SVN: zope.dublincore/trunk/ Added unit (not functional) test for loadability of ``configure.zcml``.
Tres Seaver
tseaver at palladion.com
Fri Apr 23 10:08:28 EDT 2010
Log message for revision 111294:
Added unit (not functional) test for loadability of ``configure.zcml``.
Changed:
U zope.dublincore/trunk/CHANGES.txt
U zope.dublincore/trunk/src/zope/dublincore/configure.zcml
A zope.dublincore/trunk/src/zope/dublincore/tests/test_zcml.py
-=-
Modified: zope.dublincore/trunk/CHANGES.txt
===================================================================
--- zope.dublincore/trunk/CHANGES.txt 2010-04-23 11:47:47 UTC (rev 111293)
+++ zope.dublincore/trunk/CHANGES.txt 2010-04-23 14:08:28 UTC (rev 111294)
@@ -6,7 +6,7 @@
3.6.3 (unreleased)
==================
-- TBD
+- Added unit (not functional) test for loadability of ``configure.zcml``.
3.6.2 (2010-04-20)
Modified: zope.dublincore/trunk/src/zope/dublincore/configure.zcml
===================================================================
--- zope.dublincore/trunk/src/zope/dublincore/configure.zcml 2010-04-23 11:47:47 UTC (rev 111293)
+++ zope.dublincore/trunk/src/zope/dublincore/configure.zcml 2010-04-23 14:08:28 UTC (rev 111294)
@@ -4,6 +4,9 @@
i18n_domain="zope"
>
+ <include package="zope.component" file="meta.zcml" />
+ <include package="zope.security" file="meta.zcml" />
+
<permission
id="zope.dublincore.view"
title="[zope.dublincore.view-permission]
Added: zope.dublincore/trunk/src/zope/dublincore/tests/test_zcml.py
===================================================================
--- zope.dublincore/trunk/src/zope/dublincore/tests/test_zcml.py (rev 0)
+++ zope.dublincore/trunk/src/zope/dublincore/tests/test_zcml.py 2010-04-23 14:08:28 UTC (rev 111294)
@@ -0,0 +1,35 @@
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation 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.
+#
+##############################################################################
+""" Tests that ZCML can be loaded.
+"""
+import unittest
+
+class ZCMLTests(unittest.TestCase):
+
+ from zope.component.testing import setUp
+ from zope.component.testing import tearDown
+
+ def test_loadable(self):
+ # N.B.: this test deliberately avoids any "ftesting" / layers
+ # support: its purpose is to ensure that the package's
+ # ZCML file is loadable *without* loading any other ZCML.
+ from zope.configuration.xmlconfig import file
+ import zope.dublincore
+ return file('configure.zcml', package=zope.dublincore)
+
+
+def test_suite():
+ return unittest.TestSuite((
+ unittest.makeSuite(ZCMLTests),
+ ))
More information about the checkins
mailing list