[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests - testContents.py:1.11
Barry Warsaw
barry@wooz.org
Fri, 20 Dec 2002 14:35:12 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv11652/lib/python/Zope/App/OFS/Container/Views/Browser/tests
Modified Files:
testContents.py
Log Message:
test module cleanups:
- no docstrings in test methods (convert to comments)
- whitespace normalization
- other minor cleanups
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testContents.py 1.10 => 1.11 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testContents.py:1.10 Wed Dec 4 10:19:07 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testContents.py Fri Dec 20 14:34:41 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.
-#
+#
##############################################################################
"""
@@ -43,11 +43,11 @@
def setUp(self):
PlacelessSetup.setUp(self)
- provideAdapter(IContainer, IZopeContainer, ZopeContainerAdapter)
-
+ provideAdapter(IContainer, IZopeContainer, ZopeContainerAdapter)
+
def testInfo(self):
- """ Do we get the correct information back from ContainerContents? """
+ # Do we get the correct information back from ContainerContents?
container = self._TestView__newContext()
subcontainer = self._TestView__newContext()
container.setObject( 'subcontainer', subcontainer )
@@ -81,18 +81,18 @@
import formatTime, getSize
class FauxDCAdapter:
__implements__ = IZopeDublinCore
-
+
def __init__(self, context):
pass
title = 'faux title'
size = 1024
created = datetime(2001, 1, 1, 1, 1, 1)
modified = datetime(2002, 2, 2, 2, 2, 2)
-
+
from Zope.ComponentArchitecture.GlobalAdapterService \
import provideAdapter
provideAdapter(IDocument, IZopeDublinCore, FauxDCAdapter)
-
+
fc = self._TestView__newView( container )
info = fc.listContentInfo()[0]
@@ -118,7 +118,7 @@
self.assertEqual(getSize(SizeableObject('bob')), (0,u'N/A'))
self.assertEqual(getSize('dobbs'), (0,u'N/A'))
-
+
def testRemove( self ):
container = self._TestView__newContext()
subcontainer = self._TestView__newContext()
@@ -147,7 +147,7 @@
lambda event:
removeAllProxies(event.object) == container)
)
-
+
info_list = fc.listContentInfo()
self.assertEquals( len( info_list ), 2 )