[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content/tests - test_imageupload.py:1.1.2.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 24 Dec 2002 11:32:28 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/content/tests
In directory cvs.zope.org:/tmp/cvs-serv5336
Modified Files:
Tag: NameGeddon-branch
test_imageupload.py
Log Message:
- fix module reference
- whitespace normalization
=== Zope3/src/zope/app/browser/content/tests/test_imageupload.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/browser/content/tests/test_imageupload.py:1.1.2.2 Tue Dec 24 07:50:49 2002
+++ Zope3/src/zope/app/browser/content/tests/test_imageupload.py Tue Dec 24 11:32:27 2002
@@ -19,23 +19,26 @@
"""
import os
-from unittest import TestCase, TestSuite, main, makeSuite
-from zope.publisher.browser import TestRequest
-from zope.app.content.image import Image, IImage
+import unittest
+
+import zope.app.content # __file__
+
from zope.app.browser.content.image import ImageUpload
from zope.app.browser.form.editview import EditView
-from zope.app.tests.placelesssetup import PlacelessSetup
-from zope.component.view \
- import provideView, setDefaultViewName
from zope.app.browser.form.widget import BytesWidget, BytesAreaWidget
-from zope.schema.interfaces import IField, IBytesLine, IBytes
+from zope.app.content.image import Image, IImage
+from zope.app.tests.placelesssetup import PlacelessSetup
+from zope.component.view import provideView, setDefaultViewName
+from zope.publisher.browser import TestRequest
from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.schema.interfaces import IField, IBytesLine, IBytes
+
class IU(ImageUpload, EditView):
schema = IImage
-class Test(PlacelessSetup, TestCase):
+class Test(PlacelessSetup, unittest.TestCase):
def setUp(self):
PlacelessSetup.setUp(self)
@@ -103,13 +106,10 @@
self.failIf(view.apply_update(d))
self.assertEqual(view.context.contentType, 'image/gif')
self.assertEqual(view.context.data, gifdata)
-
-
+
def test_suite():
- return TestSuite((
- makeSuite(Test),
- ))
+ return unittest.makeSuite(Test)
if __name__=='__main__':
- main(defaultTest='test_suite')
+ unittest.main(defaultTest='test_suite')