[Zope3-checkins] CVS: Zope3/src/zope/publisher/tests - httprequest.py:1.1.2.2 publication.py:1.1.2.3 test_baserequest.py:1.1.2.3 test_browserlanguages.py:1.1.2.2 test_browserresponse.py:1.1.2.2 test_httpcharsets.py:1.1.2.2 test_ipublication.py:1.1.2.4 test_mapply.py:1.1.2.2 test_publisher.py:1.1.2.3 test_requestdataproperty.py:1.1.2.2 test_xmlrpcmethodpublisher.py:1.1.2.2 test_xmlrpcrequest.py:1.1.2.2 views.py:1.1.2.2 xmlrpcviews.py:1.1.2.2
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:47 -0500
Update of /cvs-repository/Zope3/src/zope/publisher/tests
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/publisher/tests
Modified Files:
Tag: NameGeddon-branch
httprequest.py publication.py test_baserequest.py
test_browserlanguages.py test_browserresponse.py
test_httpcharsets.py test_ipublication.py test_mapply.py
test_publisher.py test_requestdataproperty.py
test_xmlrpcmethodpublisher.py test_xmlrpcrequest.py views.py
xmlrpcviews.py
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py. The
files are fixed-points of that script now. Fixed a few cases where
code relied on significant trailing whitespace (ouch).
=== Zope3/src/zope/publisher/tests/httprequest.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/httprequest.py:1.1.2.1 Mon Dec 23 17:29:50 2002
+++ Zope3/src/zope/publisher/tests/httprequest.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
Test request for writing tests that need HTTP requests.
=== Zope3/src/zope/publisher/tests/publication.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/publisher/tests/publication.py:1.1.2.2 Tue Dec 24 07:51:28 2002
+++ Zope3/src/zope/publisher/tests/publication.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
from zope.publisher.interfaces import IPublication
@@ -49,7 +49,7 @@
finally:
exc_info = 0
-
+
def callTraversalHooks(self, request, ob):
'''See interface IPublication'''
self._callTraversalHooks = getattr(self, '_callTraversalHooks', 0) + 1
@@ -66,4 +66,3 @@
app = App('')
app.ZopeCorp = App('ZopeCorp')
app.ZopeCorp.Engineering = App('Engineering')
-
=== Zope3/src/zope/publisher/tests/test_baserequest.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/publisher/tests/test_baserequest.py:1.1.2.2 Mon Dec 23 17:29:50 2002
+++ Zope3/src/zope/publisher/tests/test_baserequest.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
@@ -45,10 +45,10 @@
def test_IApplicationRequest_body(self):
from zope.publisher.base import BaseRequest
-
+
request = BaseRequest(StringIO('spam'), StringIO(), {})
self.assertEqual(request.body, 'spam')
-
+
request = BaseRequest(StringIO('spam'), StringIO(), {})
self.assertEqual(request.bodyFile.read(), 'spam')
@@ -73,7 +73,7 @@
def test_IPublisherRequest_processInputs(self):
self._Test__new().processInputs()
-
+
# Needed by BaseTestIEnumerableMapping tests:
def _IEnumerableMapping__stateDict(self):
@@ -92,5 +92,3 @@
if __name__=='__main__':
main(defaultTest='test_suite')
-
-
=== Zope3/src/zope/publisher/tests/test_browserlanguages.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_browserlanguages.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_browserlanguages.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
import unittest, sys
@@ -28,7 +28,7 @@
# XXX Add support for quality statements
-
+
def test_suite():
loader=unittest.TestLoader()
=== Zope3/src/zope/publisher/tests/test_browserresponse.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_browserresponse.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_browserresponse.py Tue Dec 24 21:21:15 2002
@@ -83,13 +83,13 @@
"text/plain")
)
-
-
-
-
-
-
+
+
+
+
+
+
def test_suite():
return TestSuite((
=== Zope3/src/zope/publisher/tests/test_httpcharsets.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_httpcharsets.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_httpcharsets.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""Retrieval of HTTP character set information.
=== Zope3/src/zope/publisher/tests/test_ipublication.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/publisher/tests/test_ipublication.py:1.1.2.3 Mon Dec 23 17:29:50 2002
+++ Zope3/src/zope/publisher/tests/test_ipublication.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
@@ -25,7 +25,7 @@
from zope.publisher.interfaces import IPublication
class BaseIPublicationTest:
-
+
# This test isn't as interesting as we'd like it to be because we
# know too little about the semantics if a particular publication
# object.
@@ -39,7 +39,7 @@
def testgetApplication(self):
self._publication.getApplication(self._request)
-
+
class Test(BaseIPublicationTest, TestCase):
@@ -53,7 +53,7 @@
request.setTraversalStack(['Engineering', 'ZopeCorp'])
publication = self._Test__new()
request.setPublication(publication)
-
+
return request
# The following are specific to our particular stub, but might be
=== Zope3/src/zope/publisher/tests/test_mapply.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_mapply.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_mapply.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
import unittest
=== Zope3/src/zope/publisher/tests/test_publisher.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/publisher/tests/test_publisher.py:1.1.2.2 Mon Dec 23 16:04:48 2002
+++ Zope3/src/zope/publisher/tests/test_publisher.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
@@ -66,7 +66,7 @@
path.reverse()
request = BaseRequest(StringIO(''), outstream, kw)
request.setTraversalStack(path)
- request.setPublication(publication)
+ request.setPublication(publication)
return request
def _publisherResults(self, path, **kw):
=== Zope3/src/zope/publisher/tests/test_requestdataproperty.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_requestdataproperty.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_requestdataproperty.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
@@ -66,7 +66,7 @@
except AttributeError: pass
else: raise """Shouldn't be able to assign"""
-
+
def test_suite():
return makeSuite(Test)
=== Zope3/src/zope/publisher/tests/test_xmlrpcmethodpublisher.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_xmlrpcmethodpublisher.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_xmlrpcmethodpublisher.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
import unittest, sys
@@ -45,7 +45,7 @@
'action')
def testXMLRPCTraverseNotFound(self):
- self.failUnlessRaises(AttributeError, self.pres.publishTraverse,
+ self.failUnlessRaises(AttributeError, self.pres.publishTraverse,
None, 'bar')
=== Zope3/src/zope/publisher/tests/test_xmlrpcrequest.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/test_xmlrpcrequest.py:1.1.2.1 Mon Dec 23 14:33:11 2002
+++ Zope3/src/zope/publisher/tests/test_xmlrpcrequest.py Tue Dec 24 21:21:15 2002
@@ -2,19 +2,19 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
import unittest
-from zope.component.tests.placelesssetup import PlacelessSetup
-from zope.component.adapter import provideAdapter
+from zope.component.tests.placelesssetup import PlacelessSetup
+from zope.component.adapter import provideAdapter
from zope.interfaces.i18n import IUserPreferredCharsets
@@ -50,7 +50,7 @@
</params>
</methodCall>
'''
-
+
class XMLRPCTests(unittest.TestCase, PlacelessSetup):
"""The only thing different to HTTP is the input processing; so there
@@ -67,7 +67,7 @@
'HTTP_AUTHORIZATION': 'Should be in accessible',
'GATEWAY_INTERFACE': 'TestFooInterface/1.0',
'HTTP_OFF_THE_WALL': "Spam 'n eggs",
- 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1, UTF-8;q=0.66, UTF-16;q=0.33',
+ 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1, UTF-8;q=0.66, UTF-16;q=0.33',
}
def setUp(self):
@@ -122,13 +122,13 @@
r = self._createRequest()
self.failUnless( r.getPresentationType() is IXMLRPCPresentation)
-
+
def testProcessInput(self):
req = self._createRequest({}, xmlrpc_call)
req.processInputs()
self.failUnlessEqual(req._args, (1,))
self.failUnlessEqual(tuple(req._path_suffix), ('action',))
-
+
def testTraversal(self):
req = self._createRequest({}, xmlrpc_call)
@@ -136,7 +136,7 @@
action = req.traverse(self.app)
self.failUnlessEqual(action(*req._args),
"Parameter[type: int; value: 1")
-
+
def test_suite():
loader = unittest.TestLoader()
@@ -144,6 +144,3 @@
if __name__=='__main__':
unittest.TextTestRunner().run( test_suite() )
-
-
-
=== Zope3/src/zope/publisher/tests/views.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/views.py:1.1.2.1 Mon Dec 23 17:29:50 2002
+++ Zope3/src/zope/publisher/tests/views.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
=== Zope3/src/zope/publisher/tests/xmlrpcviews.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/publisher/tests/xmlrpcviews.py:1.1.2.1 Mon Dec 23 17:29:50 2002
+++ Zope3/src/zope/publisher/tests/xmlrpcviews.py Tue Dec 24 21:21:15 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
-#
+#
##############################################################################
"""
@@ -24,7 +24,7 @@
class V1:
__implements__ = IXMLRPCPublisher
- def __init__(self, context, request):
+ def __init__(self, context, request):
self.context = context
self.request = request
@@ -32,9 +32,9 @@
pass
class R1:
- def __init__(self, request):
+ def __init__(self, request):
self.request = request
-
+
__implements__ = IXMLRPCPublisher
class RZMI(R1):