summaryrefslogtreecommitdiff
path: root/tests/test_client/test_fakepayload.py
AgeCommit message (Collapse)Author
2023-01-05Refs #33865 -- Improved implementation of FakePayload.Nick Pope
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.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2019-01-25Fixed grammar in FakePayload exception message.Jon Dufresne