'Verify that handle_read() processes complete messages properly.'

def test_handle_read__fullmessage(self):

    self.obj_ut.process_msg = Mock()
    self.assertEqual(self.obj_ut._iobuf.getvalue(), '')
    body = 'this    is    the    drum    roll'
    extra = 'NEXT'
    self.obj_ut._iobuf.write((('\x84\x01\x00\x02\x03\x00\x00\x00\x15' + body) + extra))
    self.obj_ut.handle_read()
    self.assertEqual(self.obj_ut._iobuf.getvalue(), extra)
    self.obj_ut.process_msg.assert_called_with(_Frame(version=4, flags=1, stream=2, opcode=3, body_offset=9, end_pos=(9 + len(body))), body)
