'L{TuntapPort.doRead} reads a datagram of fewer than
C{TuntapPort.maxPacketSize} from the port\'s file descriptor and passes
it to its protocol\'s C{datagramReceived} method.'

def test_doReadSmallDatagram(self):

    datagram = ('x' * (self.port.maxPacketSize - 1))
    self.port.startListening()
    tunnel = self.system.getTunnel(self.port)
    tunnel.readBuffer.append(datagram)
    self.port.doRead()
    self.assertEqual([datagram], self.protocol.received)
