-----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.
Any hint?
Andreas
def setUpPloneSite(self, portal):
# Install into Plone site using portal_setup
quickInstallProduct(portal, 'Products.DataGridField')
quickInstallProduct(portal, 'Products.ATVocabularyManager')
quickInstallProduct(portal, 'Products.MasterSelectWidget')
applyProfile(portal, 'vs.org:default')
import pdb; pdb.set_trace()
z2.setRoles(portal, TEST_USER_NAME, ['Manager'])
z2.login(portal, TEST_USER_NAME)
Traceback (most recent call last):
File
"/home/ajung/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
line 367, in run_layer
setup_layer(options, layer, setup_layers)
File
"/home/ajung/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
line 627, in setup_layer
setup_layer(options, base, setup_layers)
File
"/home/ajung/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
line 632, in setup_layer
layer.setUp()
File
"/home/ajung/.buildout/eggs/plone.app.testing-4.0a4-py2.6.egg/plone/app/testing/helpers.py",
line 357, in setUp
setSite(None)
File "/opt/python-2.6/lib/python2.6/contextlib.py", line 34, in __exit__
self.gen.throw(type, value, traceback)
File
"/home/ajung/.buildout/eggs/plone.app.testing-4.0a4-py2.6.egg/plone/app/testing/helpers.py",
line 247, in ploneSite
yield portal
File
"/home/ajung/.buildout/eggs/plone.app.testing-4.0a4-py2.6.egg/plone/app/testing/helpers.py",
line 356, in setUp
self.setUpPloneSite(portal)
File "/home/ajung/vs.org/src/vs.org/vs/org/tests/test_vsorg.py", line
44, in setUpPloneSite
z2.setRoles(portal, TEST_USER_NAME, ['Manager'])
File
"/home/ajung/.buildout/eggs/plone.testing-4.0a4-py2.6.egg/plone/testing/z2.py",
line 180, in setRoles
userFolder.userFolderEditUser(userId, None, list(roles), [])
AttributeError: userFolderEditUser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQGUBAEBAgAGBQJNTX7FAAoJEADcfz7u4AZjgMgLwKfcc+32HVDK8NeH4nivOsXE
y7BMIcXEV92dv9Ap+7XZT0COxU6ujgjjsPovn2dfrDJWctMutVF2jceEIP3OiPYd
Gnu4X7CDJnYYWW/ygkRjxBV+zsKeYGxATdx9LMh1TpCdv1pA7Wn6LFRsu4M4YQFE
1C0zoAow9AxMQvGQbJPMbVJywNMxEqM74AZY9juX9bVrlMeXFip99sYT+cyl94ME
KtNfoi0mRKkm8nWU7x9pgmbK+4YODBzAklytFo/5xMvsfa2+uHth6J2vb3h1SWQ7
Icw9a3I+fPaeZ3RVma5uNzE5wnvJOPUXxpS5wFOUKMDNhL3VLOyTFYla+DJ4NwtU
khgVnG9BS7QqbDBMdx/phV9St8aHIZfkgQx1zjWWwT9Majh3Yipxkwc3pUtIu1DY
Hj6e5gHfp5HAlEOafYJ4UrmmgXYslyjkXTIkLRWgI2OqhbCI+bXWRo+zup38MPEl
nBg01QqGauWAoXOxuzxUJlwa4uUIkPA=
=aXc2
-----END PGP SIGNATURE-----
<<attachment: lists.vcf>>
_______________________________________________ Product-Developers mailing list [email protected] https://lists.plone.org/mailman/listinfo/product-developers
