From: Stefan H. H. <sh...@us...> - 2003-09-23 20:45:27
|
Update of /cvsroot/plone/CMFPlone/tests In directory sc8-pr-cvs1:/tmp/cvs-serv5751 Modified Files: PloneTestCase.py Log Message: PloneTestCase allowed the portal owner to disappear. :-( Thanks to Brent Hendricks. Index: PloneTestCase.py =================================================================== RCS file: /cvsroot/plone/CMFPlone/tests/PloneTestCase.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- PloneTestCase.py 19 Sep 2003 20:30:09 -0000 1.8 +++ PloneTestCase.py 23 Sep 2003 20:45:22 -0000 1.9 @@ -35,10 +35,15 @@ if not hasattr(aq_base(app), id): _start = time.time() if not quiet: ZopeTestCase._print('Adding Plone Site ... ') - user = User('PloneTestCase', '', ['Manager'], []).__of__(app.acl_users) + # Add user and log in + uf = app.acl_users + uf._doAddUser('PloneTestCase', '', ['Manager'], []) + user = uf.getUserById('PloneTestCase').__of__(uf) newSecurityManager(None, user) + # Add Plone Site factory = app.manage_addProduct['CMFPlone'] factory.manage_addSite(id, '', create_userfolder=1) + # Log out noSecurityManager() get_transaction().commit() if not quiet: ZopeTestCase._print('done (%.3fs)\n' % (time.time()-_start,)) |