#NEWLINE# def test_start_consume( self ) : #NEWLINE# #INDENT# transport = MagicMock ( ) #NEWLINE# self . ch . on_channel_open ( transport ) #NEWLINE# self . ch . _fsm . current_state = self . ch . S_ACTIVE #NEWLINE# transport . start_consume_impl . return_value = sentinel . consumer_tag #NEWLINE# self . ch . _recv_name = NameTrio ( sentinel . xp , sentinel . queue ) #NEWLINE# self . ch . start_consume ( ) #NEWLINE# self . assertTrue ( transport . ch . _consuming ) #NEWLINE# self . assertEquals ( self . ch . _fsm . current_state , self . ch . S_ACTIVE ) #NEWLINE# self . assertEquals ( self . ch . _consumer_tag , sentinel . consumer_tag ) #NEWLINE# transport . start_consume_impl . assert_called_once_with ( self . ch . _on_deliver , queue = sentinel . queue , no_ack = self . ch . _consumer_no_ack , exclusive = self . ch . _consumer_exclusive )