#NEWLINE# def test_event_emit_delayed_call_delayed( self ) : #NEWLINE# #INDENT# ev = event . LifecycleEvent ( 'cef19ce0-0ca2-11df-855d-b19fbce37686' , event . EVENT_LIFECYCLE_STOPPED ) #NEWLINE# for uri in ( 'qemu:///system' , 'xen:///' ) : #NEWLINE# #INDENT# spawn_after_mock = mock . Mock ( ) #NEWLINE# greenthread . spawn_after = ev #NEWLINE# hostimpl = host . Host ( uri , lifecycle_event_handler = ( lambda e : None ) ) #NEWLINE# hostimpl . _event_emit_delayed ( ev ) #NEWLINE# spawn_after_mock . assert_called_once_with ( 15 , hostimpl . _event_emit , ev )