[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testSecurityManagement.py:1.1.2.6 testSecurityManager.py:1.1.2.5
Guido van Rossum
guido@python.org
Thu, 13 Dec 2001 17:12:31 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv17775/tests
Modified Files:
Tag: Zope-3x-branch
testSecurityManagement.py testSecurityManager.py
Log Message:
Rename SecurityManager.getUser to getPrincipal.
=== Zope3/lib/python/Zope/App/Security/tests/testSecurityManagement.py 1.1.2.5 => 1.1.2.6 ===
old = newSecurityManager( other_user )
self.failUnless( old is not None )
- self.failUnless( old.getUser() is some_user )
+ self.failUnless( old.getPrincipal() is some_user )
old2 = replaceSecurityManager( old )
self.failUnless( old2 is not None )
- self.failUnless( old2.getUser() is other_user )
+ self.failUnless( old2.getPrincipal() is other_user )
noSecurityManager()
@@ -65,7 +65,7 @@
self.failUnless( replaceSecurityManager( None ) is None )
mgr = getSecurityManager()
- self.assertEqual( mgr.getUser(), None)
+ self.assertEqual( mgr.getPrincipal(), None)
# XXX maybe add test for default principal case
self.failIf( mgr.calledByExecutable() )
self.assertEqual( replaceSecurityManager( None ), mgr )
=== Zope3/lib/python/Zope/App/Security/tests/testSecurityManager.py 1.1.2.4 => 1.1.2.5 ===
mgr = self._makeMgr()
- self.assertEqual( mgr.getUser(), self._context.user )
+ self.assertEqual( mgr.getPrincipal(), self._context.user )
self.failIf( mgr.calledByExecutable() )
def test_w_default_policy( self ):