[Zope3-checkins] CVS: Zope3/src/zope/app/externaleditor/tests -
test_external_edit.py:1.5
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Mar 18 22:17:19 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/externaleditor/tests
In directory cvs.zope.org:/tmp/cvs-serv2348/src/zope/app/externaleditor/tests
Modified Files:
test_external_edit.py
Log Message:
Adjust the tests to the new IFile API.
=== Zope3/src/zope/app/externaleditor/tests/test_external_edit.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/externaleditor/tests/test_external_edit.py:1.4 Mon Mar 15 08:10:48 2004
+++ Zope3/src/zope/app/externaleditor/tests/test_external_edit.py Thu Mar 18 22:17:18 2004
@@ -9,10 +9,10 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
-"""
+"""External Editor Tests
+
$Id$
"""
-
import unittest
from base64 import encodestring
@@ -35,10 +35,10 @@
class ReadFileAdapter(FileReadFile):
def getContentType(self):
- return self.context.getContentType()
+ return self.context.contentType
def setContentType(self, ct):
- self.context.setContentType(ct)
+ self.context.contentType = ct
contentType = property(getContentType, setContentType)
@@ -62,8 +62,8 @@
request = TestRequest(environ=env)
container = zapi.traverse(self.rootFolder, 'folder1')
file = EditableFile('Foobar', 'text/plain')
- self.assertEqual(file.getContentType(), 'text/plain')
- self.assertEqual(file.getData(), 'Foobar')
+ self.assertEqual(file.contentType, 'text/plain')
+ self.assertEqual(file.data, 'Foobar')
file = contained(file, container, 'file')
view = zapi.queryView(file, 'external_edit', request, None)
self.failIf(view is None)
More information about the Zope3-Checkins
mailing list