[Product-Developers] [plone.app.testing] Issue with z2.setRoles()

Andreas Jung lists at zopyx.com
Sat Feb 5 17:27:44 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Aspeli wrote:
> Hi,
> 
> On 5 February 2011 16:45, Andreas Jung <lists at zopyx.com> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi there,
>>
>> I am trying to use plone.app.testing under Plone 4 for a decent AT-based
>> content-type. How plone.app.testing is failing badly with the following
>> setupPloneSite() call. Obviously there is some issue with the setRoles()
>> call. The signature of setRoles() excepts a userfolder objects and not a
>> portal object (documentation error?). Passing in portal.acl_users also
>> does not help since the code will fail afterwards with a different error.
> 
> If you're using Plone, try to use
> 
> from plone.app.testing import setRoles
> 
> setRoles(portal, userId, roles)
> 
> This definitely takes the portal as an argument. (see
> http://pypi.python.org/pypi/plone.app.testing).

Appearently Google gave me the docs of an older plone.app.testing
release really using z2.setRoles(). The current docs is correct.

Sorry for the noise.

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJNTYiPAAoJEADcfz7u4AZjbzULwIl1Tr8mptbJ2vtSJa4YTjqL
10kg8BGVPCIcg3LWkrGuIuPBugvuMmlHvIatU95XE+1K8aWPga0SMRZRP/W09cY+
Te+lX7KuVjKQiMqGyH4wTINjWO0Hg+GSCB8eLqXh/xSsOJBUZw5zFt5ShlQ9DIdE
m9kwN6VRSGySKPF3HMoebPzjnlzu4mR01kLj/qGe/tQnqFzO1bqLy2XyHk91bgyL
TzF8oIVtJmTpRPg4ADu5nBX3jzqqSEXRJt2DNRuZt3r3H+RgbcyLz/3ZHBvNvrE2
NLXIXB40eIrlaSJYPLq2SSuXHqGZmHwkKvsUawf4qEvLrYpcf5pJIYYPaCPIELJm
FCKZXtYClB00UVYT6TSwK6/iZq6QOzEcX5CuLrYC2if5SSHLFDesy7Y/uC3Z3du7
QVArNyS+WZygtrvl9mjYeLdUj7dfQMIFaWVv4QCnq/hKUDeSQctvaqpNP3mIQ6gG
fRSNOqaQ+epAimYRKXxF325hDOj285Y=
=0YqH
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20110205/0d299e4c/attachment-0002.vcf>


More information about the Product-Developers mailing list