[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/exception/ merge
ftests into tests
Bernd Dorn
bernd.dorn at lovelysystems.com
Tue Mar 27 06:50:24 EDT 2007
Log message for revision 73711:
merge ftests into tests
Changed:
D Zope3/trunk/src/zope/app/exception/browser/ftests.py
A Zope3/trunk/src/zope/app/exception/browser/tests/test_error.py
U Zope3/trunk/src/zope/app/exception/ftesting.zcml
-=-
Deleted: Zope3/trunk/src/zope/app/exception/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/exception/browser/ftests.py 2007-03-27 10:43:31 UTC (rev 73710)
+++ Zope3/trunk/src/zope/app/exception/browser/ftests.py 2007-03-27 10:50:23 UTC (rev 73711)
@@ -1,50 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 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.
-#
-##############################################################################
-"""Functional tests for NotFoundError
-
-$Id$
-"""
-import unittest
-from zope.app.testing import functional
-from zope.component.interfaces import ComponentLookupError
-from zope.app.exception.testing import AppExceptionLayer
-
-class RaiseComponentLookupError(object):
-
- def __call__(self):
- raise ComponentLookupError()
-
-
-class TestComponentLookupError(functional.BrowserTestCase):
-
- def testComponentLookupError(self):
- response = self.publish('/foobar', basic='mgr:mgrpw',
- handle_errors=True)
- self.assertEqual(response.getStatus(), 404)
- body = response.getBody()
- self.assert_(
- 'The page that you are trying to access is not available' in body)
-
-
-def test_suite():
- TestComponentLookupError.layer = AppExceptionLayer
- systemerror = functional.FunctionalDocFileSuite('systemerror.txt')
- systemerror.layer = AppExceptionLayer
- return unittest.TestSuite((
- unittest.makeSuite(TestComponentLookupError),
- systemerror,
- ))
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
Copied: Zope3/trunk/src/zope/app/exception/browser/tests/test_error.py (from rev 73638, Zope3/trunk/src/zope/app/exception/browser/ftests.py)
===================================================================
--- Zope3/trunk/src/zope/app/exception/browser/ftests.py 2007-03-26 16:27:10 UTC (rev 73638)
+++ Zope3/trunk/src/zope/app/exception/browser/tests/test_error.py 2007-03-27 10:50:23 UTC (rev 73711)
@@ -0,0 +1,50 @@
+##############################################################################
+#
+# Copyright (c) 2004 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.
+#
+##############################################################################
+"""Functional tests for NotFoundError
+
+$Id$
+"""
+import unittest
+from zope.app.testing import functional
+from zope.component.interfaces import ComponentLookupError
+from zope.app.exception.testing import AppExceptionLayer
+
+class RaiseComponentLookupError(object):
+
+ def __call__(self):
+ raise ComponentLookupError()
+
+
+class TestComponentLookupError(functional.BrowserTestCase):
+
+ def testComponentLookupError(self):
+ response = self.publish('/foobar', basic='mgr:mgrpw',
+ handle_errors=True)
+ self.assertEqual(response.getStatus(), 404)
+ body = response.getBody()
+ self.assert_(
+ 'The page that you are trying to access is not available' in body)
+
+
+def test_suite():
+ TestComponentLookupError.layer = AppExceptionLayer
+ systemerror = functional.FunctionalDocFileSuite('../systemerror.txt')
+ systemerror.layer = AppExceptionLayer
+ return unittest.TestSuite((
+ unittest.makeSuite(TestComponentLookupError),
+ systemerror,
+ ))
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')
Modified: Zope3/trunk/src/zope/app/exception/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/app/exception/ftesting.zcml 2007-03-27 10:43:31 UTC (rev 73710)
+++ Zope3/trunk/src/zope/app/exception/ftesting.zcml 2007-03-27 10:50:23 UTC (rev 73711)
@@ -18,7 +18,7 @@
<browser:page
for="zope.app.folder.interfaces.IFolder"
name="componentlookuperror.html"
- class="zope.app.exception.browser.ftests.RaiseComponentLookupError"
+ class="zope.app.exception.browser.tests.test_error.RaiseComponentLookupError"
permission="zope.Public"
/>
More information about the Zope3-Checkins
mailing list