diff --git a/django/test/client.py b/django/test/client.py index c3110f02ec..e4fd54c23b 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -65,10 +65,7 @@ def encode_multipart(boundary, data): if isinstance(value, file): lines.extend([ '--' + boundary, - 'Content-Disposition: form-data; name="%s"' % key, - '', - '--' + boundary, - 'Content-Disposition: form-data; name="%s_file"; filename="%s"' % (key, value.name), + 'Content-Disposition: form-data; name="%s"; filename="%s"' % (key, value.name), 'Content-Type: application/octet-stream', '', value.read() @@ -251,4 +248,4 @@ class Client: return True else: return False - \ No newline at end of file +