[CMF-checkins] CVS: Products/CMFCore/tests -
test_TypesTool.py:1.20.4.6 test_URLTool.py:1.3.14.2
Sidnei da Silva
sidnei at awkly.org
Wed Mar 16 12:58:24 EST 2005
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv4965/CMFCore/tests
Modified Files:
Tag: CMF-1_4-branch
test_TypesTool.py test_URLTool.py
Log Message:
- Get rid of apply
- Behave accordingly with Zope 2.8
=== Products/CMFCore/tests/test_TypesTool.py 1.20.4.5 => 1.20.4.6 ===
--- Products/CMFCore/tests/test_TypesTool.py:1.20.4.5 Fri Apr 23 17:11:35 2004
+++ Products/CMFCore/tests/test_TypesTool.py Wed Mar 16 12:57:53 2005
@@ -54,7 +54,7 @@
self.ttool = self.site._setObject( 'portal_types', TypesTool() )
fti = FTIDATA_DUMMY[0].copy()
del fti['id']
- self.ttool._setObject( 'Dummy Content', apply( FTI, ('Dummy Content',), fti) )
+ self.ttool._setObject('Dummy Content', FTI('Dummy Content', **fti))
def test_processActions( self ):
"""
@@ -159,7 +159,7 @@
def _makeAndSetInstance( self,id,**kw ):
tool = self.tool
- t = apply( self._makeInstance, (id,), kw )
+ t = self._makeInstance(id, **kw)
tool._setObject(id,t)
return tool[id]
@@ -324,13 +324,13 @@
class FTIDataTests( TypeInfoTests ):
def _makeInstance( self, id, **kw ):
- return apply( FTI, ( id, ), kw )
+ return FTI(id, **kw)
def _makeInstanceByFTIData(self, ftidata):
fti = ftidata[0].copy()
id = fti['id']
del fti['id']
- return apply( FTI, ( id, ), fti )
+ return FTI(id, **fti)
def test_properties( self ):
ti = self._makeInstance( 'Foo' )
@@ -354,13 +354,13 @@
class STIDataTests( TypeInfoTests ):
def _makeInstance( self, id, **kw ):
- return apply( STI, ( id, ), kw )
+ return STI(id, **kw)
def _makeInstanceByFTIData(self, ftidata):
fti = ftidata[0].copy()
id = fti['id']
del fti['id']
- return apply( STI, ( id, ), fti )
+ return STI(id, **fti)
def test_properties( self ):
ti = self._makeInstance( 'Foo' )
@@ -387,7 +387,7 @@
noSecurityManager()
def _makeInstance( self, id, **kw ):
- return apply( FTI, ( id, ), kw )
+ return FTI(id, **kw)
def _makeFolder( self, fake_product=0 ):
return DummyFolder( fake_product )
=== Products/CMFCore/tests/test_URLTool.py 1.3.14.1 => 1.3.14.2 ===
--- Products/CMFCore/tests/test_URLTool.py:1.3.14.1 Wed Jun 11 07:10:43 2003
+++ Products/CMFCore/tests/test_URLTool.py Wed Mar 16 12:57:53 2005
@@ -25,7 +25,7 @@
self.site = DummySite(id='foo')
def _makeOne(self, *args, **kw):
- url_tool = apply( URLTool, args, kw )
+ url_tool = URLTool(*args, **kw)
return url_tool.__of__( self.site )
def test_portal_methods(self):
More information about the CMF-checkins
mailing list