mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Added a test for Client.generic() data coercion.
The smart_str() call (now force_bytes()) added in
e73838b6dd is otherwise untested.
This commit is contained in:
@@ -53,7 +53,10 @@ def trace_view(request):
|
||||
def put_view(request):
|
||||
if request.method == 'PUT':
|
||||
t = Template('Data received: {{ data }} is the body.', name='PUT Template')
|
||||
c = Context({'data': request.body.decode()})
|
||||
c = Context({
|
||||
'Content-Length': request.META['CONTENT_LENGTH'],
|
||||
'data': request.body.decode(),
|
||||
})
|
||||
else:
|
||||
t = Template('Viewing GET page.', name='Empty GET Template')
|
||||
c = Context()
|
||||
|
||||
Reference in New Issue
Block a user