#NEWLINE# @ mock . patch ( 'tornado.ioloop.PeriodicCallback' ) #NEWLINE# def test_publisher_initializer( self , periodic_callback_mock ) : #NEWLINE# #INDENT# 'Test instrument_ioloop() setups monitoring and creates a PeriodicCallback' #NEWLINE# def publisher( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# result = initialize_mutornadomon ( io_loop = tornado . ioloop . IOLoop . current ( ) , publisher = publisher ) #NEWLINE# assert periodic_callback_mock . called #NEWLINE# self . assertTrue ( isinstance ( result , mutornadomon . MuTornadoMon ) )