[CMF-checkins] CVS: Products/CMFCore/tests - test_PortalFolder.py:1.9 test_all.py:1.3
Tres Seaver
tseaver@zope.com
Thu, 20 Sep 2001 12:52:01 -0400
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv7461/CMFCore/tests
Modified Files:
test_PortalFolder.py test_all.py
Log Message:
- Fix unit test drivers to work with Zope 2.4 / Python 2.1 (unittest
module no longer has JUnitTestTextRunner).
=== Products/CMFCore/tests/test_PortalFolder.py 1.8 => 1.9 ===
sub2 = folder.sub2
# Waaa! force sub2 to allow paste of Dummy object.
- sub2.all_meta_types = sub2.all_meta_types() + extra_meta_types()
+ sub2.all_meta_types = []
+ sub2.all_meta_types.extend( sub2.all_meta_types )
+ sub2.all_meta_types.extend( extra_meta_types() )
cookie = folder.manage_cutObjects( ids=['bar'] )
sub2.manage_pasteObjects( cookie )
@@ -280,7 +282,9 @@
cookie = sub1.manage_copyObjects( ids = ( 'dummy', ) )
# Waaa! force sub2 to allow paste of Dummy object.
#import pdb; pdb.set_trace()
- sub2.all_meta_types = sub2.all_meta_types() + extra_meta_types()
+ sub2.all_meta_types = []
+ sub2.all_meta_types.extend( sub2.all_meta_types )
+ sub2.all_meta_types.extend( extra_meta_types() )
sub2.manage_pasteObjects( cookie )
assert 'dummy' in sub1.objectIds()
assert 'dummy' in sub1.contentIds()
@@ -294,7 +298,9 @@
cookie = sub1.manage_cutObjects( ids = ( 'dummy', ) )
# Waaa! force sub2 to allow paste of Dummy object.
- sub3.all_meta_types = sub3.all_meta_types() + extra_meta_types()
+ sub3.all_meta_types = []
+ sub3.all_meta_types.extend( sub3.all_meta_types )
+ sub3.all_meta_types.extend( extra_meta_types() )
sub3.manage_pasteObjects( cookie )
assert not 'dummy' in sub1.objectIds()
assert not 'dummy' in sub1.contentIds()
=== Products/CMFCore/tests/test_all.py 1.2 => 1.3 ===
def run():
- unittest.JUnitTextTestRunner().run(test_suite())
+ if hasattr( unittest, 'JUnitTextTestRunner' ):
+ unittest.JUnitTextTestRunner().run( test_suite() )
+ else:
+ unittest.TextTestRunner( verbosity=0 ).run( test_suite() )
if __name__ == '__main__':
run()