[CMF-checkins] CVS: CMF/CMFDefault/tests - test_Favorite.py:1.7
Yvo Schubbe
cvs-admin at zope.org
Mon Dec 1 08:56:16 EST 2003
Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv16302/CMFDefault/tests
Modified Files:
test_Favorite.py
Log Message:
some code modernization:
- death to string module
- death to apply
- import and whitespace cleanup
=== CMF/CMFDefault/tests/test_Favorite.py 1.6 => 1.7 ===
--- CMF/CMFDefault/tests/test_Favorite.py:1.6 Sat Aug 3 15:25:00 2002
+++ CMF/CMFDefault/tests/test_Favorite.py Mon Dec 1 08:55:45 2003
@@ -1,38 +1,43 @@
##############################################################################
#
# Copyright (c) 2001 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
-#
+#
##############################################################################
""" Unit tests for Favorites.
$Id$
"""
-import Zope
from unittest import TestCase, TestSuite, makeSuite, main
-from Products.CMFCore.tests.base.dummy import \
- DummyTool as DummyURLTool, \
- DummyObject as DummySite
+import Testing
+import Zope
+try:
+ Zope.startup()
+except AttributeError:
+ # for Zope versions before 2.6.1
+ pass
+from Products.CMFCore.tests.base.dummy import DummyObject as DummySite
+from Products.CMFCore.tests.base.dummy import DummyTool as DummyURLTool
from Products.CMFDefault.Favorite import Favorite
+
class FavoriteTests( TestCase ):
def setUp( self ):
self.tool = DummyURLTool()
self.site = DummySite( portal_url=self.tool )
- def _makeOne( self, *args, **kw ):
-
- f = apply( Favorite, args, kw )
+ def _makeOne(self, *args, **kw):
+ f = Favorite(*args, **kw)
return f.__of__( self.site )
def test_Empty( self ):
More information about the CMF-checkins
mailing list