diff options
| author | John <thorrak@users.noreply.github.com> | 2021-03-26 03:04:59 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-26 08:05:22 +0100 |
| commit | 57d456319d237f74798ff65238a3604e9b4e06a1 (patch) | |
| tree | 8d1e68002948b0369f608dffcd8516711ea631af /docs | |
| parent | 5ebb8e65dfddc70b0e91add0232fcb074006f571 (diff) | |
[3.2.x] Added missing mode="rb" argument to open() call in Client.post() example in docs.
Backport of 509d266c6aae5e4d5738fe2a2cba0bde581aac2b from main
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing/tools.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 84f1eabff1..bef2aa42fe 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 |
