#NEWLINE# def testDispatcherResult( self ) : #NEWLINE# #INDENT# d = EventDispatcher ( ) #NEWLINE# msg = Element ( ( 'ns' , 'message' ) ) #NEWLINE# pres = Element ( ( 'ns' , 'presence' ) ) #NEWLINE# cb = CallbackTracker ( ) #NEWLINE# d . addObserver ( '/presence' , cb . call ) #NEWLINE# result = d . dispatch ( msg ) #NEWLINE# self . assertEquals ( False , result ) #NEWLINE# result = d . dispatch ( pres ) #NEWLINE# self . assertEquals ( True , result )