#NEWLINE# def test_Node_consumer_multiple_listeners( self ) : #NEWLINE# #INDENT# warnings . resetwarnings ( ) #NEWLINE# consumer = self . node . Consumer ( ) #NEWLINE# q = consumer . queues [ 0 ] #NEWLINE# with warnings . catch_warnings ( record = True ) as log : #NEWLINE# #INDENT# q . on_declared ( 'foo' , 1 , 1 ) #NEWLINE# self . assertTrue ( log ) #NEWLINE# self . assertIn ( 'already using this' , log [ 0 ] . message . args [ 0 ] ) #NEWLINE# #UNINDENT# with warnings . catch_warnings ( record = True ) as log : #NEWLINE# #INDENT# q . on_declared ( 'foo' , 1 , 0 ) #NEWLINE# self . assertFalse ( log )