#NEWLINE# @ patch ( 'ws4py.manager.SelectPoller' ) #NEWLINE# def test_cannot_add_websocket_more_than_once( self , MockSelectPoller ) : #NEWLINE# #INDENT# m = WebSocketManager ( poller = MockSelectPoller ( ) ) #NEWLINE# ws = MagicMock ( ) #NEWLINE# ws . sock . fileno . return_value = 1 #NEWLINE# m . add ( ws ) #NEWLINE# self . assertEqual ( len ( m ) , 1 ) #NEWLINE# m . add ( ws ) #NEWLINE# self . assertEqual ( len ( m ) , 1 )