mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #14753 -- Fixed the test client to not raise an AssertionError when request.raw_post_data is accessed from a view it has fetched with GET. Thanks zimnyx for the report and ojii for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -46,7 +46,7 @@ class FakePayload(object):
|
||||
|
||||
def read(self, num_bytes=None):
|
||||
if num_bytes is None:
|
||||
num_bytes = self.__len or 1
|
||||
num_bytes = self.__len or 0
|
||||
assert self.__len >= num_bytes, "Cannot read more than the available bytes from the HTTP incoming data."
|
||||
content = self.__content.read(num_bytes)
|
||||
self.__len -= num_bytes
|
||||
|
||||
Reference in New Issue
Block a user