django/tests/test_client
Nick Pope 57f5669d23 Refs #33865 -- Improved implementation of FakePayload.
FakePayload is a wrapper around io.BytesIO and is expected to
masquerade as though it is a file-like object. For that reason it makes
sense that it should inherit the correct signatures from io.BytesIO
methods.

Crucially an implementation of .readline() is added which will be
necessary for this to behave more like the expected file-like objects as
LimitedStream will be changed to defer to the wrapped stream object
rather than rolling its own implementation for improved performance.

It should be safe to adjust these signatures because FakePayload is
only used internally within test client helpers, is undocumented, and
thus private.
2023-01-05 19:25:25 +01:00
..
__init__.py Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
auth_backends.py Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
test_conditional_content_removal.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_fakepayload.py Refs #33865 -- Improved implementation of FakePayload. 2023-01-05 19:25:25 +01:00
tests.py Refs #34074 -- Used headers argument for RequestFactory and Client in docs and tests. 2023-01-04 09:11:36 +01:00
urls.py Fixed #32969 -- Fixed pickling HttpResponse and subclasses. 2022-06-20 08:51:26 +02:00
urls_middleware_urlconf.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
views.py Updated documentation and comments for RFC updates. 2022-11-10 13:52:17 +01:00