summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohn <thorrak@users.noreply.github.com>2021-03-26 03:04:59 -0400
committerGitHub <noreply@github.com>2021-03-26 08:04:59 +0100
commit509d266c6aae5e4d5738fe2a2cba0bde581aac2b (patch)
tree368f3cf0cecf0df6685ec0f18d7ea5f99d0bf301 /docs
parent0860db225a4a7059c0884c87c0a7aa0035fd0d36 (diff)
Added missing mode="rb" argument to open() call in Client.post() example in docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/testing/tools.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt
index 02da186aa2..dadde52ee8 100644
--- a/docs/topics/testing/tools.txt
+++ b/docs/topics/testing/tools.txt
@@ -244,7 +244,7 @@ Use the ``django.test.Client`` class to make requests.
wish to upload as a value. For example::
>>> c = Client()
- >>> with open('wishlist.doc') as fp:
+ >>> with open('wishlist.doc', 'rb') as fp:
... c.post('/customers/wishes/', {'name': 'fred', 'attachment': fp})
(The name ``attachment`` here is not relevant; use whatever name your