[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publisher/xmlrpc/ re-arrange to play nice with the new testrunner

Fred L. Drake, Jr. fdrake at gmail.com
Sun Mar 25 05:38:46 EDT 2007


Log message for revision 73560:
  re-arrange to play nice with the new testrunner

Changed:
  D   Zope3/trunk/src/zope/app/publisher/xmlrpc/ftests.py
  A   Zope3/trunk/src/zope/app/publisher/xmlrpc/tests/test_functional.py

-=-
Deleted: Zope3/trunk/src/zope/app/publisher/xmlrpc/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/xmlrpc/ftests.py	2007-03-25 09:36:50 UTC (rev 73559)
+++ Zope3/trunk/src/zope/app/publisher/xmlrpc/ftests.py	2007-03-25 09:38:45 UTC (rev 73560)
@@ -1,61 +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 xmlrpc
-
-$Id$
-"""
-import re
-
-import zope.component
-import zope.interface
-import zope.publisher.interfaces.xmlrpc
-from zope.testing import renormalizing
-
-import zope.app.folder.folder
-from zope.app.testing import functional, setup
-from zope.app.publisher.testing import AppPublisherLayer
-
-def setUp(test):
-    setup.setUpTestAsModule(test, 'zope.app.publisher.xmlrpc.README')
-
-def tearDown(test):
-    # clean up the views we registered:
-    
-    # we use the fact that registering None unregisters whatever is
-    # registered. We can't use an unregistration call because that
-    # requires the object that was registered and we don't have that handy.
-    # (OK, we could get it if we want. Maybe later.)
-
-    zope.component.provideAdapter(None, (
-        zope.app.folder.folder.IFolder,
-        zope.publisher.interfaces.xmlrpc.IXMLRPCRequest
-        ), zope.interface, 'contents')
-
-    setup.tearDownTestAsModule(test)
-
-def test_suite():
-    checker = renormalizing.RENormalizing((
-        (re.compile('<DateTime \''), '<DateTime u\''),
-        (re.compile('at [-0-9a-fA-F]+'), 'at <SOME ADDRESS>'),
-        ))
-    suite = functional.FunctionalDocFileSuite(
-        'README.txt', setUp=setUp, tearDown=tearDown,
-        checker=checker
-        )
-    suite.layer = AppPublisherLayer
-    return suite
-
-if __name__ == '__main__':
-    import unittest
-    unittest.main(defaultTest='test_suite')

Copied: Zope3/trunk/src/zope/app/publisher/xmlrpc/tests/test_functional.py (from rev 73522, Zope3/trunk/src/zope/app/publisher/xmlrpc/ftests.py)
===================================================================
--- Zope3/trunk/src/zope/app/publisher/xmlrpc/ftests.py	2007-03-24 23:51:08 UTC (rev 73522)
+++ Zope3/trunk/src/zope/app/publisher/xmlrpc/tests/test_functional.py	2007-03-25 09:38:45 UTC (rev 73560)
@@ -0,0 +1,61 @@
+##############################################################################
+#
+# 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 xmlrpc
+
+$Id$
+"""
+import re
+
+import zope.component
+import zope.interface
+import zope.publisher.interfaces.xmlrpc
+from zope.testing import renormalizing
+
+import zope.app.folder.folder
+from zope.app.testing import functional, setup
+from zope.app.publisher.testing import AppPublisherLayer
+
+def setUp(test):
+    setup.setUpTestAsModule(test, 'zope.app.publisher.xmlrpc.README')
+
+def tearDown(test):
+    # clean up the views we registered:
+    
+    # we use the fact that registering None unregisters whatever is
+    # registered. We can't use an unregistration call because that
+    # requires the object that was registered and we don't have that handy.
+    # (OK, we could get it if we want. Maybe later.)
+
+    zope.component.provideAdapter(None, (
+        zope.app.folder.folder.IFolder,
+        zope.publisher.interfaces.xmlrpc.IXMLRPCRequest
+        ), zope.interface, 'contents')
+
+    setup.tearDownTestAsModule(test)
+
+def test_suite():
+    checker = renormalizing.RENormalizing((
+        (re.compile('<DateTime \''), '<DateTime u\''),
+        (re.compile('at [-0-9a-fA-F]+'), 'at <SOME ADDRESS>'),
+        ))
+    suite = functional.FunctionalDocFileSuite(
+        '../README.txt', setUp=setUp, tearDown=tearDown,
+        checker=checker
+        )
+    suite.layer = AppPublisherLayer
+    return suite
+
+if __name__ == '__main__':
+    import unittest
+    unittest.main(defaultTest='test_suite')



More information about the Zope3-Checkins mailing list