def test_longLineAfterShortLine(self):
"""
If L{LineReceiver.dataReceived} is called with bytes representing a
short line followed by bytes that exceed the length limit without a
line delimiter, L{LineReceiver.lineLengthExceeded} is called with all
of the bytes following the short line's delimiter.
"""
excessive = b'x' * (self.proto.MAX_LENGTH * 2 + 2)
self.proto.dataReceived(b'x' + self.proto.delimiter + excessive)
self.assertEqual([excessive], self.proto.longLines)
评论列表
文章目录