[CMF-checkins] CVS: CMF/CMFCalendar/tests - test_Event.py:1.3.30.1

Chris Withers chrisw@nipltd.com
Thu, 14 Feb 2002 10:04:09 -0500


Update of /cvs-repository/CMF/CMFCalendar/tests
In directory cvs.zope.org:/tmp/cvs-serv25500/tests

Modified Files:
      Tag: ChrisW-refactor_tests-branch
	test_Event.py 
Log Message:
CMFCalendar tests done.

=== CMF/CMFCalendar/tests/test_Event.py 1.3 => 1.3.30.1 ===
 import Zope
-import unittest, string
-from Products.CMFCalendar.Event import *
+from unittest import TestCase, TestSuite, main, makeSuite
+from Products.CMFCalendar.Event import Event
 from DateTime import DateTime
 
-class TestEvent(unittest.TestCase):
-
-    def setUp( self ):
-        get_transaction().begin()
-
-    def tearDown( self ):
-        get_transaction().abort()
+class TestEvent(TestCase):
 
     def test_new(self):
         event = Event('test')
@@ -54,12 +47,9 @@
                          )
 
 def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest( unittest.makeSuite( TestEvent ) )
-    return suite
-
-def run():
-    unittest.TextTestRunner().run(test_suite())
+    return TestSuite((
+        makeSuite( TestEvent ),
+        ))
 
 if __name__ == '__main__':
-    run()
+    main(defaultTest='test_suite')