[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/File/tests - testFile.py:1.3
Jim Fulton
jim@zope.com
Mon, 11 Nov 2002 16:05:17 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/File/tests
In directory cvs.zope.org:/tmp/cvs-serv21821/tests
Modified Files:
testFile.py
Log Message:
Changed to use (single-line) Line field for content type.
Changed to to use an automatically-generated editing form
when the content type begins with "text/".
Added an automatically-generated upload form that is customized with a
class to provide a custom widget (a file widget) for the data.
=== Zope3/lib/python/Zope/App/OFS/Content/File/tests/testFile.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/Content/File/tests/testFile.py:1.2 Mon Jun 10 19:28:00 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/File/tests/testFile.py Mon Nov 11 16:05:16 2002
@@ -103,6 +103,13 @@
self.failUnless(verifyClass(IFile, File))
+ def testEdit(self):
+ file = self._makeFile()
+
+ file.edit('Data', 'text/plain')
+ self.assertEqual(file.getContentType(), 'text/plain')
+ self.assertEqual(file.getData(), 'Data')
+
def test_suite():
loader = unittest.TestLoader()