#NEWLINE# def test_cleanup( self ) : #NEWLINE# #INDENT# with expect ( mock ( rabbit_connection , 'super' ) ) . args ( is_arg ( RabbitBasicClass ) , RabbitBasicClass ) . returns ( mock ( ) ) as c : #NEWLINE# #INDENT# expect ( c . _cleanup ) . args ( ) #NEWLINE# #UNINDENT# self . klass . _cleanup ( ) #NEWLINE# assert_equals ( None , self . klass . _ack_listener ) #NEWLINE# assert_equals ( None , self . klass . _nack_listener ) #NEWLINE# assert_equals ( None , c . klass . _broker_cancel_cb_map )