[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/tests - testImageData.py:1.1.2.4 testImageEdit.py:1.1.2.6
Jim Fulton
jim@zope.com
Fri, 7 Jun 2002 10:41:42 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/OFS/Content/Image/Views/Browser/tests
Modified Files:
Tag: Zope-3x-branch
testImageData.py testImageEdit.py
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals):
- RenameAllowToRequire
- GroupClassRelatedDirectivesInClassDirective
- ViewInterfaceAndSimplification
- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes
- TwoArgumentViewConstructors
- ImplementsInZCML
- SimpleViewCreationInZCML
- RemoveGetView
- ReplaceProtectWithAllow
- ViewMethodsAsViews
- MergeProtectionAndComponentDefinitions
There were also various security fixes resulting of better integration
of security with components.
=== Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/tests/testImageData.py 1.1.2.3 => 1.1.2.4 ===
image = Image('Data')
- id = ImageData(image)
+ id = ImageData(image, None)
- self.assertEqual(id.index(), 'Data')
+ self.assertEqual(id(), 'Data')
def testTag(self):
@@ -41,7 +41,7 @@
return '/img'
image = Image()
- fe = ImageData(image)
+ fe = ImageData(image, None)
fe.absolute_url = absolute_url
self.assertEqual(fe.tag(),
=== Zope3/lib/python/Zope/App/OFS/Content/Image/Views/Browser/tests/testImageEdit.py 1.1.2.5 => 1.1.2.6 ===
""" """
file = Image()
- fe = ImageEdit(file)
+ fe = ImageEdit(file, None)
file = cStringIO.StringIO()
file.write('Data')
@@ -35,8 +35,8 @@
# XXX How can I create a REQUEST object?
#fe.action({'field_data': file, 'field_contentType': 'text/plain'})
- #self.assertEqual(fe.getContext().getContentType(), 'text/plain')
- #self.assertEqual(fe.getContext().getData(), 'Data')
+ #self.assertEqual(fe.context.getContentType(), 'text/plain')
+ #self.assertEqual(fe.context.getData(), 'Data')