b.t.test_http_response : module documentation

Part of bzrlib.tests

Tests from HTTP response parsing.

The handle_response method read the response body of a GET request an returns
the corresponding RangeFile.

There are four different kinds of RangeFile:
- a whole file whose size is unknown, seen as a simple byte stream,
- a whole file whose size is known, we can't read past its end,
- a single range file, a part of a file with a start and a size,
- a multiple range file, several consecutive parts with known start offset
  and size.

Some properties are common to all kinds:
- seek can only be forward (its really a socket underneath),
- read can't cross ranges,
- successive ranges are taken into account transparently,

- the expected pattern of use is either seek(offset)+read(size) or a single
  read with no size specified. For multiple range files, multiple read() will
  return the corresponding ranges, trying to read further will raise
Class ReadSocket A socket-like object that can be given a predefined content.
Class FakeHTTPConnection No class docstring; 1/2 methods documented
Class TestHTTPConnection Undocumented
Class TestRangeFileMixin Tests for accessing the first range in a RangeFile.
Class TestRangeFileSizeUnknown Test a RangeFile for a whole file whose size is not known.
Class TestRangeFileSizeKnown Test a RangeFile for a whole file whose size is known.
Class TestRangeFileSingleRange Test a RangeFile for a single range.
Class TestRangeFileMultipleRanges Test a RangeFile for multiple ranges.
Class TestRangeFileMultipleRangesQuotedBoundaries Perform the same tests as TestRangeFileMultipleRanges, but uses
Class TestRangeFileVarious Tests RangeFile aspects not covered elsewhere.
Class TestHandleResponse No class docstring; 1/14 methods documented
Class TestRangeFileSizeReadLimited Test RangeFile _max_read_size functionality which limits the size of
API Documentation for Bazaar, generated by pydoctor at 2021-09-24 00:20:35.