#NEWLINE# def test_refresh( self ) : #NEWLINE# #INDENT# self . service . start ( ) #NEWLINE# threading . Event ( ) . wait ( 0.1 ) #NEWLINE# self . service . stop ( ) #NEWLINE# def self_ret( ) : #NEWLINE# #INDENT# self_ret . val = True #NEWLINE# #UNINDENT# self_ret . val = False #NEWLINE# self . service . _check_thread . refresh = self_ret #NEWLINE# config [ 'interface' ] [ 'test' ] = { #NEWLINE# #INDENT# 'admin_id' : 'test_admin' , #NEWLINE# #UNINDENT# } #NEWLINE# fake_sender = CommandSubmitter ( 'test' , 'fake_sender' ) #NEWLINE# self . service . _refresh ( True , self_ret ) #NEWLINE# ok_ ( ( self_ret . val is not True ) ) #NEWLINE# self . service . _refresh ( True , CommandSubmitter ( 'test' , 'test_admin' ) ) #NEWLINE# ok_ ( ( self_ret . val is True ) )