[Twisted-web] How to insert an Athena event handler using Stan?

Jean-Paul Calderone exarkun at divmod.com
Wed Nov 1 10:15:36 CST 2006

On Wed, 1 Nov 2006 11:00:24 -0500, Phil Christensen <phil at bubblehouse.org> wrote:
>On Nov 1, 2006, at 10:50 AM, Mike Pelletier wrote:
>>On Wednesday 01 November 2006 10:41, Phil Christensen wrote:
>>>I'm not entirely sure how to write a formal unit test that includes
>>>the javascript side testing, but I've attached a minimal test case to
>>>a ticket at:
>>But it's so easy!  (Oww, I pulled my sarcastic muscle.)
>>Here is a tutorial: http://blackjml.livejournal.com/21602.html  I  mention 
>>for posterity.
>Thanks for the link; I had encountered that in my research, but I  don't 
>understand how this could be used to test an issue with an  event handler. 
>This may be just be due to my extremely poor unit  testing discipline, but 
>any clues would be appreciated!

Testing anything related to events is tricky, due to security controls
imposed on page JavaScript.  There's probably a way to deal with it, but
it hasn't been documented or codified in Athena yet.

The issue with the handler you showed me is most likely that the handler
thinks its first argument is an event, but it is actually a node.  There is
no way to access the event object right now, but I have been considering
just passing it as the next argument.


More information about the Twisted-web mailing list