duck.tests.test_socket_io

Tests for HTTP request framing over Duck sockets.

Module Contents

Classes

TestSocketIORequestFraming

Verifies that requests without a body delimiter complete at their headers.

Data

EMPTY_GET_REQUEST

API

duck.tests.test_socket_io.EMPTY_GET_REQUEST

b’GET / HTTP/1.1\r\nHost: localhost\r\n\r\n’

class duck.tests.test_socket_io.TestSocketIORequestFraming(methodName='runTest')[source]

Bases: unittest.TestCase

Verifies that requests without a body delimiter complete at their headers.

Initialization

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_async_receive_full_request_does_not_wait_for_empty_get_body() None[source]

Returns an asynchronous HTTP GET without attempting a second body read.

test_receive_full_request_does_not_wait_for_empty_get_body() None[source]

Returns an HTTP GET request without attempting a second body read.