def test_clear_synchronous_cb_when_pending_cb_doesnt_match_but_isnt_in_list(self): c = Channel(None,None) c._pending_events = ['foo'] expect( c._flush_pending_events ) c.clear_synchronous_cb( 'bar' ) assertEquals( ['foo'], c._pending_events )
def test_clear_synchronous_cb_when_pending_cb_matches(self): c = Channel(None,None) c._pending_events = ['foo'] expect( c._flush_pending_events ) c.clear_synchronous_cb( 'foo' ) assertEquals( [], c._pending_events )
def test_clear_synchronous_cb_when_pending_cb_matches(self): c = Channel(None, None) c._pending_events = ['foo'] expect(c._flush_pending_events) c.clear_synchronous_cb('foo') assertEquals([], c._pending_events)
def test_clear_synchronous_cb_when_pending_cb_doesnt_match_but_isnt_in_list( self): c = Channel(None, None) c._pending_events = ['foo'] expect(c._flush_pending_events) c.clear_synchronous_cb('bar') assertEquals(['foo'], c._pending_events)
def test_clear_synchronous_cb_when_pending_cb_doesnt_match_but_isnt_in_list(self): c = Channel(None, None, {}) c._pending_events = deque(['foo']) expect(c._flush_pending_events) assert_equals('bar', c.clear_synchronous_cb('bar')) assert_equals(deque(['foo']), c._pending_events)
def test_clear_synchronous_cb_when_pending_cb_matches(self): c = Channel(None, None, {}) c._pending_events = deque(['foo']) expect(c._flush_pending_events) assert_equals('foo', c.clear_synchronous_cb('foo')) assert_equals(deque([]), c._pending_events)
def test_clear_synchronous_cb_when_pending_cb_matches(self): c = Channel(None, None, {}) c._pending_events = deque(['foo']) expect(c._flush_pending_events) assert_equals('foo', c.clear_synchronous_cb('foo')) assertEquals(deque([]), c._pending_events)
def test_clear_synchronous_cb_when_pending_cb_doesnt_match_but_isnt_in_list(self): c = Channel(None,None,{}) c._pending_events = deque(['foo']) expect( c._flush_pending_events ) assert_equals( 'bar', c.clear_synchronous_cb('bar') ) assertEquals( deque(['foo']), c._pending_events )
def test_clear_synchronous_cb_when_no_pending(self): c = Channel(None, None, {}) stub(c._flush_pending_events) assert_equals(deque([]), c._pending_events) assert_equals('foo', c.clear_synchronous_cb('foo'))
def test_clear_synchronous_cb_when_no_pending(self): c = Channel(None, None, {}) stub(c._flush_pending_events) assertEquals(deque([]), c._pending_events) assert_equals('foo', c.clear_synchronous_cb('foo'))
def test_clear_synchronous_cb_when_no_pending(self): c = Channel(None,None) stub( c._flush_pending_events ) assertEquals( [], c._pending_events ) c.clear_synchronous_cb( 'foo' )