From 509d266c6aae5e4d5738fe2a2cba0bde581aac2b Mon Sep 17 00:00:00 2001 From: John Date: Fri, 26 Mar 2021 03:04:59 -0400 Subject: [PATCH] Added missing mode="rb" argument to open() call in Client.post() example in docs. --- docs/topics/testing/tools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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