mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
[1.5.x] Fixed #20237 -- Reenabled assertContains with binary parameter
Thanks Baptiste Mispelon for the review.
Backport of fe01404bb9 from master.
This commit is contained in:
@@ -70,6 +70,11 @@ def request_methods_view(request):
|
||||
def return_unicode(request):
|
||||
return render_to_response('unicode.html')
|
||||
|
||||
def return_undecodable_binary(request):
|
||||
return HttpResponse(
|
||||
b'%PDF-1.4\r\n%\x93\x8c\x8b\x9e ReportLab Generated PDF document http://www.reportlab.com'
|
||||
)
|
||||
|
||||
def return_json_file(request):
|
||||
"A view that parses and returns a JSON string as a file."
|
||||
match = CONTENT_TYPE_RE.match(request.META['CONTENT_TYPE'])
|
||||
|
||||
Reference in New Issue
Block a user