[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/XMLRPC/tests - testDirectives.py:1.1.4.4

Guido van Rossum guido@python.org
Tue, 4 Jun 2002 14:59:58 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/XMLRPC/tests
In directory cvs.zope.org:/tmp/cvs-serv1575/lib/python/Zope/Publisher/XMLRPC/tests

Modified Files:
      Tag: Zope-3x-branch
	testDirectives.py 
Log Message:
Whoever (not Jeremy :-) checks in files from Windows with the CRLF
markers still left in, please stop doing this.  It screws up the
checkouts for everyone else (including Windows users who use the
command line cvs tools).  Hint: some wincvs do this.



=== Zope3/lib/python/Zope/Publisher/XMLRPC/tests/testDirectives.py 1.1.4.3 => 1.1.4.4 ===
 # 
 ##############################################################################
-import unittest
-from Zope.Configuration.xmlconfig import xmlconfig
-from Zope.Publisher.XMLRPC.IXMLRPCPublisher import IXMLRPCPublisher
-from Zope.Publisher.XMLRPC.tests.TestViews import IC, V1, VZMI, R1, RZMI
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
-from Zope.ComponentArchitecture import getView
-from cStringIO import StringIO
-
-template = """<zopeConfigure
-   xmlns='http://namespaces.zope.org/zope'
-   xmlns:xmlrpc='http://namespaces.zope.org/xmlrpc'>
-   %s
-   </zopeConfigure>"""
-
-class Ob:
-    __implements__ = IC
-
-class Test(PlacelessSetup, unittest.TestCase):
-
-    def testView(self):
-
-        ob = Ob()
-        self.assertEqual(getView(ob, 'test', IXMLRPCPublisher, None), None)
-
-        xmlconfig(StringIO(template % (
-            '''
-            <directive name="view"
-              attributes="component, name, for, layer"
-              handler="Zope.Publisher.XMLRPC.metaConfigure.view"
-              namespace="http://namespaces.zope.org/xmlrpc" />
-            <xmlrpc:view name="test"
-              factory="Zope.Publisher.XMLRPC.tests.TestViews.V1"
-              for="Zope.Publisher.XMLRPC.tests.TestViews.IC" /> 
-            '''
-            ))) 
-        
-        self.assertEqual(getView(ob, 'test', IXMLRPCPublisher, None
-                                 ).__class__, V1)
-
-
-    
-def test_suite():
-    loader = unittest.TestLoader()
-    return loader.loadTestsFromTestCase(Test)
-
-if __name__ == '__main__':
-    unittest.TextTestRunner().run(test_suite())
+import unittest
+from Zope.Configuration.xmlconfig import xmlconfig
+from Zope.Publisher.XMLRPC.IXMLRPCPublisher import IXMLRPCPublisher
+from Zope.Publisher.XMLRPC.tests.TestViews import IC, V1, VZMI, R1, RZMI
+from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.ComponentArchitecture import getView
+from cStringIO import StringIO
+
+template = """<zopeConfigure
+   xmlns='http://namespaces.zope.org/zope'
+   xmlns:xmlrpc='http://namespaces.zope.org/xmlrpc'>
+   %s
+   </zopeConfigure>"""
+
+class Ob:
+    __implements__ = IC
+
+class Test(PlacelessSetup, unittest.TestCase):
+
+    def testView(self):
+
+        ob = Ob()
+        self.assertEqual(getView(ob, 'test', IXMLRPCPublisher, None), None)
+
+        xmlconfig(StringIO(template % (
+            '''
+            <directive name="view"
+              attributes="component, name, for, layer"
+              handler="Zope.Publisher.XMLRPC.metaConfigure.view"
+              namespace="http://namespaces.zope.org/xmlrpc" />
+            <xmlrpc:view name="test"
+              factory="Zope.Publisher.XMLRPC.tests.TestViews.V1"
+              for="Zope.Publisher.XMLRPC.tests.TestViews.IC" /> 
+            '''
+            ))) 
+        
+        self.assertEqual(getView(ob, 'test', IXMLRPCPublisher, None
+                                 ).__class__, V1)
+
+
+    
+def test_suite():
+    loader = unittest.TestLoader()
+    return loader.loadTestsFromTestCase(Test)
+
+if __name__ == '__main__':
+    unittest.TextTestRunner().run(test_suite())