#NEWLINE# @ patch ( 'ws4py.manager.SelectPoller' ) #NEWLINE# def test_mainloop_can_be_stopped_when_no_websocket_were_registered( self , MockSelectPoller ) : #NEWLINE# #INDENT# m = WebSocketManager ( poller = MockSelectPoller ( ) ) #NEWLINE# self . assertFalse ( self . running ) #NEWLINE# m . start ( ) #NEWLINE# self . assertTrue ( m . running ) #NEWLINE# m . stop ( ) #NEWLINE# self . assertFalse ( m . running )