[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testPrincipalRoleView.py:1.1.2.3
Martijn Pieters
mj@zope.com
Fri, 8 Feb 2002 20:02:05 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv20905
Modified Files:
Tag: Zope-3x-branch
testPrincipalRoleView.py
Log Message:
Fix this test so it actually tests the correct assertion.
=== Zope3/lib/python/Zope/App/Security/tests/testPrincipalRoleView.py 1.1.2.2 => 1.1.2.3 ===
grid = view.createGrid()
- p_ids = view.getAllPrincipals()
- r_ids = view.getAllRoles()
+ p_ids = [p.getId() for p in view.getAllPrincipals()]
+ r_ids = [r.getId() for r in view.getAllRoles()]
self.failUnless( grid.listAvailableValues())
+
for id in [p.getId() for p in grid.principals()]:
- self.failUnless( id not in p_ids)
+ self.failUnless(id in p_ids)
for id in [r.getId() for r in grid.roles()]:
- self.failUnless( id not in r_ids)
+ self.failUnless(id in r_ids)
map = DummyManager()