def test_parent_read_timer_cb_when_read_cb_reset(self):
   sock = EventSocket()
   sock._pending_read_cb_event = 'foo'
   
   sock._parent_read_timer_cb()
   assert_equals( 'error processing socket input buffer', sock._error_msg )
   assert_equals( None, sock._pending_read_cb_event )
  def test_parent_read_timer_cb_when_closed(self):
    sock = EventSocket()
    sock._pending_read_cb_event = 'foo'
    sock._closed = True
    sock._parent_read_cb = mock()

    sock._parent_read_timer_cb()
    assert_equals( None, sock._error_msg )
    assert_equals( 'foo', sock._pending_read_cb_event )
  def test_parent_read_timer_cb(self):
    sock = EventSocket()
    sock._pending_read_cb_event = 'foo'
    sock._parent_read_cb = mock()
    expect( sock._parent_read_cb ).args( sock )

    sock._parent_read_timer_cb()
    assert_equals( 'error processing socket input buffer', sock._error_msg )
    assert_equals( None, sock._pending_read_cb_event )