[Kss-devel] Superfluous view registration?
Jeroen Vloothuis
jeroen.vloothuis at xs4all.nl
Wed Mar 12 18:11:04 CET 2008
Balazs Ree wrote:
> This is, besides the unittest you mentioned, also completely tested in
> all variations in the "error" demo and selenium test.
No it is not tested in the Selenium tests. That is what made me think
this was a useless view (since kss.zope does not load it and all
Selenium tests ran fine). The Selenium test in question has this code:
@kssaction
def errTest(self, id, act):
What happens is that the `kssaction` decorator itself catches exceptions
and returns an entirely different body (normal KSS style). Here is a
small snippet of that code (from actionwrapper.py).
try:
result = self.f(obj, *arg, **kw)
except KSSExplicitError, exc:
# Clear all the commands, and emit an error command
obj.commands.clear()
obj.commands.add('error', None, message=str(exc))
So it seems that at the very least we have lack in our tests. What I
would like to know is when would this view be used if `kssaction` seems
to do it's own thing?
More information about the Kss-devel
mailing list