Ejemplo n.º 1
0
 def test_append_sz_gt_overflow(self):
     from waitress.buffers import BytesIOBasedBuffer
     f = io.BytesIO(b'data')
     inst = self._makeOne(f)
     buf = BytesIOBasedBuffer()
     inst.buf = buf
     inst.overflow = 2
     inst.append(b'data2')
     self.assertEqual(f.getvalue(), b'data')
     self.assertTrue(inst.overflowed)
     self.assertNotEqual(inst.buf, buf)
Ejemplo n.º 2
0
 def _makeOne(self, from_buffer=None):
     from waitress.buffers import BytesIOBasedBuffer
     return BytesIOBasedBuffer(from_buffer=from_buffer)