[Kss-devel] problems with KSSAndPloneLayer
Balazs Ree
ree at ree.hu
Mon Aug 20 13:42:21 CEST 2007
We have serious problems with KSSAndPloneLayer.
For history, we recently spent some days with Daniel and Stephan with
cleaning up the layer. First we realized: we must not multiple inherit
the layer from PloneSite and KSSLayer, we should single inherit from
PloneSite and add the necessary things to the setup with mixins.
(PloneSite brings up the kss zcml any way.) Second, that in the layer it
is obligatory to have cleanUp to be defined, even as empty. Reasons for
this, is the way layers got picked up from superclasses, and that in
tests inheriting from PloneSite, we must *not* tear down the CA itself
because the tests execute aterwards would need them. The layer is correct
now as far as kss tests don't kill out other tests any more and
everything works.
Or at least, so far it all seemed so. But yesterday I realized that
actually none of the zope events owned by kss (that we use to update the
portlets if content changed, for example) are listened to in the
plone.app.kss and archetypes.kss tests. I have no idea so far, why this
happens.)
This is actually not new. In archetypes.kss, tests/test_fields.py we have
testSaveFieldWithEvents, used to test for the additional updates the
events should insert into commands. But these were removed in Sorrento, I
believe, to make the asserts satisfied. :( [Probably by me.]
In addition the previous test testSaveField, was testing _just_ the main
response without the possible effect of events, and called
stopListeningToEvents or something to achieve that and prevent the events
from happening. This method has also been removed from the kss base view
a long time ago, indicating the problem has not occured recently, because
the tests would not run without it.
If anyone could have a look at this, would be great. First thing would
be, that testSaveFieldWithEvents should generate the navigation portlet
and breadcrumbs update commands, if events are listened to as they should.
(Needless to say: everything works in a live portal, this seems to be a
pure testing problem.)
Any idea?
--
Balazs Ree
More information about the Kss-devel
mailing list