def _respects_length_test(self, factory):
    '\n        Assert that when the given buffer is passed to `Connection.recv_into`\n        along with a value for `nbytes` that is less than the size of that\n        buffer, only `nbytes` bytes are written into the buffer.\n        '
    output_buffer = factory(10)
    (server, client) = loopback()
    server.send(b'abcdefghij')
    assert (client.recv_into(output_buffer, 5) == 5)
    assert (output_buffer == bytearray(b'abcde\x00\x00\x00\x00\x00'))
Assert that when the given buffer is passed to `Connection.recv_into`
along with a value for `nbytes` that is less than the size of that
buffer, only `nbytes` bytes are written into the buffer.
def _respects_length_test(self, factory):
    '\n        Assert that when the given buffer is passed to `Connection.recv_into`\n        along with a value for `nbytes` that is less than the size of that\n        buffer, only `nbytes` bytes are written into the buffer.\n        '
    output_buffer = factory(10)
    (server, client) = loopback()
    server.send(b'abcdefghij')
    assert (client.recv_into(output_buffer, 5) == 5)
    assert (output_buffer == bytearray(b'abcde\x00\x00\x00\x00\x00'))