diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-11 20:03:07 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-11 20:03:07 +0000 |
| commit | a4d773b5801b91553ffe097840d770d2ea2b8b23 (patch) | |
| tree | cbf23ec13d3d81996edc97a083a1c666d8d43be8 | |
| parent | 5c346840bb8f980d7879492a841d29d00486e41e (diff) | |
Fixed a bug in the way file uploads were constructed. The new behaviour
should emulate a form upload more accurately.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/test/client.py | 7 |
1 files changed, 2 insertions, 5 deletions
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 + |
