You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a plugin developer
I want to return deferred objects from plugin methods
So that I can easily unit test such methods
I think what is needed is for plugins.core.Registry.process to handle twisted.internet.defer.Deferred objects, rather than (or in addition too) catching ResponseNotReady. It should break if first_responder and continue otherwise. (I think this is a bug in the current implementation, ResponseNotReady breaks without considering first_responder).
Also a callback could be added to the Deferred to write the output to channel and update last_message (this currently happens in Client.privmsg though, not sure if you want to filter Deferreds out of the returned responses there though)
I think I'm definitely +1 on this for helga 2.0. It will certainly simplify implementations. I think I'll prefer just returning deferred objects rather than handling ResopnseNotReady in 2.0.
Activity
shaunduncan commentedon Dec 30, 2014
I think I'm definitely +1 on this for helga 2.0. It will certainly simplify implementations. I think I'll prefer just returning deferred objects rather than handling ResopnseNotReady in 2.0.