#NEWLINE# def test_declare_default_args( self ) : #NEWLINE# #INDENT# w = mock ( ) #NEWLINE# expect ( self . klass . allow_nowait ) . returns ( True ) #NEWLINE# expect ( mock ( exchange_class , 'Writer' ) ) . returns ( w ) #NEWLINE# expect ( w . write_short ) . args ( self . klass . default_ticket ) . returns ( w ) #NEWLINE# expect ( w . write_shortstr ) . args ( 'exchange' ) . returns ( self ) #NEWLINE# expect ( w . write_shortstr ) . args ( 'topic' ) . returns ( w ) #NEWLINE# expect ( w . write_bits ) . args ( False , False , False , False , True ) . returns ( w ) #NEWLINE# expect ( w . write_table ) . args ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# expect ( mock ( exchange_class , 'MethodFrame' ) ) . args ( 42 , 40 , 10 , w ) . returns ( 'frame' ) #NEWLINE# expect ( self . klass . send_frame ) . args ( 'frame' ) #NEWLINE# stub ( self . klass . channel . add_synchronous_cb ) #NEWLINE# self . klass . declare ( 'exchange' , 'topic' ) #NEWLINE# assert_equals ( deque ( ) , self . klass . _declare_cb )