[Grok-dev] bug in ftesting.zcml ??
Uli Fouquet
uli at gnufix.de
Sat Apr 26 18:36:19 EDT 2008
Hi Santiago,
first of all: thanks for the bug and trying the HOWTO.
Santiago Videla wrote:
> I made a new grokproject using a clean virtualenv, and then I try to
> follow this toturial about testing:
>
> http://grok.zope.org/documentation/how-to/writing%2Cdiscovering%
> 2Crunning-tests-with-z3c.testsetup
>
> When I try to make a functional test, I got the following error:
>
> ./bin/test
> Running tests at level 1
[...]
> Running sample.testing.FunctionalLayer tests:
> Set up sample.testing.FunctionalLayer Traceback (most recent call
> last):
> ZopeXMLConfigurationError: File
> "/home/sancho/grok/Sample/src/sample/ftesting.zcml", line 11.2-13.8
> ConfigurationError: ('Invalid value for', 'component',
> "ImportError: Couldn't import zope.app.securitypolicy.zopepolicy, No
> module named securitypolicy.zopepolicy")
Apparently the zope.app.securitypolicy.zopepolicy package is missing in
your setup and by replacing it with zope.securitypolicy.zopepolicy you
had success. I'm glad you posted this problem here.
>
> Tests with errors:
> runTest (zope.testing.testrunner.SetUpLayerFailure)
> Total: 2 tests, 0 failures, 1 errors in 2.404 seconds.
>
>
> I did a little change in Sample/src/sample/ftesting.zcml
>
> from:
>
> <securityPolicy
>
> component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy"
> />
>
> to:
>
> <securityPolicy
> component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy"
> />
>
>
> and now it's working.
>
> it's this ok? it's bug in ftesting.zcml or there is something missing
> in my environment?
You did exactly the right thing :-) I assume you ran grokproject before
and are using Grok 0.12?
Projects generated by grokproject unfortunately get an ftesting.zcml,
that includes the wrong zopesecuritypolicy package. I wasn't aware of
this yet.
This changed from Grok 0.11.1 to 0.12, so I'd consider this a bug in
grokproject. If it creates Grok 0.12 projects, then it should also
generate appropriate ftesting.zcml files.
Could you file a bug report on launchpad
(https://bugs.launchpad.net/grok/), saying that grokproject generates
faulty ftesting.zcmls? I'll do a patch as soon as possible.
Seems we have a lot of stuff to do for grokproject on the upcoming
sprint.
I'll update the HowTo shortly.
Thanks for the report and
kind regards,
--
Uli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080427/042da37d/attachment-0001.bin
More information about the Grok-dev
mailing list