Ported to plone.app.testing