[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/File/Views/Browser/tests - __init__.py:1.2 testFileEdit.py:1.2
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 19:28:29 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/File/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv17445/lib/python/Zope/App/OFS/Content/File/Views/Browser/tests
Added Files:
__init__.py testFileEdit.py
Log Message:
Merged Zope-3x-branch into newly forked Zope3 CVS Tree.
=== Zope3/lib/python/Zope/App/OFS/Content/File/Views/Browser/tests/__init__.py 1.1 => 1.2 ===
+#
+# 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
=== Zope3/lib/python/Zope/App/OFS/Content/File/Views/Browser/tests/testFileEdit.py 1.1 => 1.2 ===
+#
+# 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+import unittest
+
+from Zope.App.OFS.Content.File.Views.Browser.FileEdit import FileEdit
+from Zope.App.OFS.Content.File.NaiveFile import NaiveFile
+
+
+class Test( unittest.TestCase ):
+
+ def testEdit(self):
+ """ """
+ file = NaiveFile()
+
+ fe = FileEdit(file, None)
+
+ fe.context.edit('Data', 'text/plain')
+ self.assertEqual(fe.context.getContentType(), 'text/plain')
+ self.assertEqual(fe.context.getData(), 'Data')
+
+
+def test_suite():
+ loader = unittest.TestLoader()
+ return loader.loadTestsFromTestCase( Test )
+
+if __name__=='__main__':
+ unittest.main()