[CMF-checkins] CVS: CMF/CMFCore/tests/base - dummy.py:1.1.2.4
Chris Withers
chrisw@nipltd.com
Fri, 15 Feb 2002 10:41:50 -0500
Update of /cvs-repository/CMF/CMFCore/tests/base
In directory cvs.zope.org:/tmp/cvs-serv14406/tests/base
Modified Files:
Tag: ChrisW-refactor_tests-branch
dummy.py
Log Message:
Done Expression
=== CMF/CMFCore/tests/base/dummy.py 1.1.2.3 => 1.1.2.4 ===
"""
meta_type = 'Dummy'
+ url = 'foo_url'
after_add_called = before_delete_called = 0
def __init__( self, id='dummy', *args, **kw ):
@@ -30,6 +31,7 @@
self.reset()
self.catalog = kw.get('catalog',0)
+ self.url = kw.get('url',None)
def manage_afterAdd( self, item, container ):
self.after_add_called = 1
@@ -41,6 +43,9 @@
if self.catalog:
PortalContent.manage_beforeDelete( self, item, container )
+ def absolute_url(self):
+ return self.url
+
def reset( self ):
self.after_add_called = self.before_delete_called = 0
@@ -138,3 +143,14 @@
def _getOb( self, id ):
return self._objects[id]
+
+class DummyMembershipTool:
+ def __init__(self, anon=1):
+ self.anon = anon
+
+ def isAnonymousUser(self):
+ return self.anon
+
+ def getAuthenticatedMember(self):
+ return "member"
+