[CMF-checkins] CVS: CMF/CMFCore/tests/base - dummy.py:1.1.2.2
Chris Withers
chrisw@nipltd.com
Fri, 15 Feb 2002 04:40:25 -0500
Update of /cvs-repository/CMF/CMFCore/tests/base
In directory cvs.zope.org:/tmp/cvs-serv20964/CMFCore/tests/base
Modified Files:
Tag: ChrisW-refactor_tests-branch
dummy.py
Log Message:
PortalFolder mostly done, time to go to work :-)
=== CMF/CMFCore/tests/base/dummy.py 1.1.2.1 => 1.1.2.2 ===
"""
meta_type = 'Dummy'
+ after_add_called = before_delete_called = 0
def __init__( self, id='dummy', *args, **kw ):
self.id = id
self._args = args
self._kw = {}
self._kw.update( kw )
+
+ self.reset()
+ self.catalog = kw.get('catalog',0)
+
+ def manage_afterAdd( self, item, container ):
+ self.after_add_called = 1
+ if self.catalog:
+ PortalContent.manage_afterAdd( self, item, container )
+
+ def manage_beforeDelete( self, item, container ):
+ self.before_delete_called = 1
+ if self.catalog:
+ PortalContent.manage_beforeDelete( self, item, container )
+
+ def reset( self ):
+ self.after_add_called = self.before_delete_called = 0
+
+ # WAAAAAAAAA! we don't want the Database export/import crap in the way.
+ def _getCopy( self, container ):
+ return DummyContent( self.id, catalog=self.catalog )
def addDummy( self, id ):
"""