#NEWLINE# def test_select_when_not_enabled_and_no_cb_but_synchronous( self ) : #NEWLINE# #INDENT# self . klass . _enabled = False #NEWLINE# w = mock ( ) #NEWLINE# expect ( mock ( rabbit_connection , 'Writer' ) ) . returns ( self ) #NEWLINE# stub ( self . klass . allow_nowait ) #NEWLINE# expect ( w . write_bit ) . args ( False ) #NEWLINE# expect ( mock ( rabbit_connection , 'MethodFrame' ) ) . args ( 42 , 85 , 10 , w ) . returns ( 'frame' ) #NEWLINE# expect ( self . klass . send_frame ) . args ( 'frame' ) #NEWLINE# expect ( self . klass . channel . add_synchronous_cb ) . args ( self . klass . _recv_select_ok ) #NEWLINE# self . klass . select ( nowait = False ) #NEWLINE# assert_true ( self . klass . _enabled ) #NEWLINE# assert_equals ( deque ( [ None ] ) , self . klass . _select_cb )