[Zope3-checkins] CVS: Zope3/lib/python/Zope/Publisher/Browser/tests - testBrowserRequest.py:1.10
Barry Warsaw
barry@wooz.org
Fri, 20 Dec 2002 14:35:18 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv11652/lib/python/Zope/Publisher/Browser/tests
Modified Files:
testBrowserRequest.py
Log Message:
test module cleanups:
- no docstrings in test methods (convert to comments)
- whitespace normalization
- other minor cleanups
=== Zope3/lib/python/Zope/Publisher/Browser/tests/testBrowserRequest.py 1.9 => 1.10 ===
--- Zope3/lib/python/Zope/Publisher/Browser/tests/testBrowserRequest.py:1.9 Thu Dec 5 04:42:05 2002
+++ Zope3/lib/python/Zope/Publisher/Browser/tests/testBrowserRequest.py Fri Dec 20 14:34:47 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.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
-from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
+from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
from Zope.I18n.IUserPreferredCharsets import IUserPreferredCharsets
@@ -42,7 +42,7 @@
return ob.browserDefault(request)
return ob, ()
-
+
class BrowserTests(HTTPTests, PlacelessSetup):
@@ -55,9 +55,9 @@
'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):
PlacelessSetup.setUp(self)
provideAdapter(IHTTPRequest, IUserPreferredCharsets, HTTPCharsets)
@@ -82,7 +82,7 @@
" "
def browserDefault(self, request):
return self, ['index']
-
+
def index(self, a, b):
" "
return "%s, %s" % (`a`, `b`)
@@ -127,8 +127,7 @@
"u'5', 6")
def testIPresentationRequest(self):
- ''' test the IView request'''
-
+ # test the IView request
r = self._createRequest()
self.failUnless( r.getPresentationType() is IBrowserPresentation)
@@ -259,8 +258,6 @@
loader = unittest.TestLoader()
return loader.loadTestsFromTestCase(BrowserTests)
-if __name__=='__main__':
- unittest.TextTestRunner().run( test_suite() )
-
-
+if __name__ == '__main__':
+ unittest.TextTestRunner().run( test_suite() )