#NEWLINE# def __init__( self , parameters ) : #NEWLINE# #INDENT# super ( TestHook , self ) . __init__ ( parameters ) #NEWLINE# self . context . subscribe ( 'event1' , self . handler1 ) #NEWLINE# self . context . subscribe_async ( 'event1' , self . async_handler ) #NEWLINE# self . context . subscribe ( 'event2' , self . handler2 ) #NEWLINE# self . context . subscribe ( 'cascade_sync' , self . cascade_handler ) #NEWLINE# self . context . subscribe ( 'cascade_async' , self . cascade_async_handler ) #NEWLINE# self . called1 = False #NEWLINE# self . event_arg = None #NEWLINE# self . clean = False #NEWLINE# self . async_called = threading . Event ( )