#NEWLINE# @ patch ( 'ws4py.manager.SelectPoller' ) #NEWLINE# def test_broadcast( self , MockSelectPoller ) : #NEWLINE# #INDENT# m = WebSocketManager ( poller = MockSelectPoller ( ) ) #NEWLINE# ws = MagicMock ( ) #NEWLINE# ws . terminated = False #NEWLINE# m . add ( ws ) #NEWLINE# m . broadcast ( b'hello there' ) #NEWLINE# ws . send . assert_called_once_with ( b'hello there' , False )