[Zope-Checkins] CVS: Zope/lib/python/OFS/tests -
testObjectManager.py:1.4.2.2
Zachery Bir
zbir at urbanape.com
Thu Mar 18 14:00:34 EST 2004
Update of /cvs-repository/Zope/lib/python/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv13515
Modified Files:
Tag: Zope-2_6-branch
testObjectManager.py
Log Message:
- remove unnecessary additional complexity from the FauxUser (we
don't test any of that here.)
- slight clarification on some of the test names and content ids
=== Zope/lib/python/OFS/tests/testObjectManager.py 1.4.2.1 => 1.4.2.2 ===
--- Zope/lib/python/OFS/tests/testObjectManager.py:1.4.2.1 Wed Mar 17 19:43:55 2004
+++ Zope/lib/python/OFS/tests/testObjectManager.py Thu Mar 18 14:00:33 2004
@@ -25,44 +25,11 @@
self._id = id
self._login = login
- self._roles = {}
- self._groups = {}
def getId( self ):
return self._id
- def getUserName( self ):
-
- return self._login
-
- def getRoles( self ):
-
- return self._roles
-
- def getGroups( self ):
-
- return self._groups
-
- def allowed( self, value, roles ):
-
- return 1
-
- def _addRoles( self, roles ):
-
- for role in roles:
- self._roles[role] = 1
-
- def _addGroups(self, groups):
-
- for group in groups:
- self._groups[group] = 1
-
- def __repr__( self ):
-
- return '<FauxUser: %s>' % self._id
-
-
class ObjectManagerTests( unittest.TestCase ):
def tearDown( self ):
@@ -132,7 +99,7 @@
self.assertEqual( si.__ac_local_roles__, None )
- def test_setObject_set_owner_with_simple_user( self ):
+ def test_setObject_set_owner_with_user( self ):
om = self._makeOne()
@@ -140,11 +107,11 @@
newSecurityManager( None, user )
- si = SimpleItem( 'faux_creation' )
+ si = SimpleItem( 'user_creation' )
self.assertEqual( si.__ac_local_roles__, None )
- om._setObject( 'faux_creation', si )
+ om._setObject( 'user_creation', si )
self.assertEqual( si.__ac_local_roles__, { 'user': ['Owner'] } )
More information about the Zope-Checkins
mailing list