twisted.protocols.test.test_basic.IntNTestCaseMixin(LPTestCaseMixin)
class documentationtwisted.protocols.test.test_basic
(View In Hierarchy)
Known subclasses: twisted.protocols.test.test_basic.Int16Tests, twisted.protocols.test.test_basic.Int32Tests, twisted.protocols.test.test_basic.Int8Tests, twisted.test.test_stateful.Int32Tests
TestCase mixin for int-prefixed protocols.
Method | test_receive | Test receiving data find the same data send. |
Method | test_partial | Send partial data, nothing should be definitely received. |
Method | test_send | Test sending data over protocol. |
Method | test_lengthLimitExceeded | When a length prefix is received which is greater than the protocol's
MAX_LENGTH attribute, the lengthLimitExceeded
method is called with the received length prefix. |
Method | test_longStringNotDelivered | If a length prefix for a string longer than MAX_LENGTH is
delivered to dataReceived at the same time as the entire
string, the string is not passed to stringReceived . |
Method | test_stringReceivedNotImplemented | When IntNStringReceiver.stringReceived
is not overridden in a subclass, calling it raises
NotImplementedError . |
Inherited from LPTestCaseMixin:
Method | getProtocol | Return a new instance of self.protocol connected to a new
instance of proto_helpers.StringTransport . |
Method | test_illegal | Assert that illegal strings cause the transport to be closed. |
When a length prefix is received which is greater than the protocol's
MAX_LENGTH
attribute, the lengthLimitExceeded
method is called with the received length prefix.
If a length prefix for a string longer than MAX_LENGTH
is
delivered to dataReceived
at the same time as the entire
string, the string is not passed to stringReceived
.
When IntNStringReceiver.stringReceived
is not overridden in a subclass, calling it raises
NotImplementedError
.