diff options
| author | 薛丞宏 <ihcaoe@gmail.com> | 2015-10-23 21:12:49 +0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-10-23 14:27:20 -0400 |
| commit | 2eab4acb3e523d296b3ed1e0374d2a40486e96cc (patch) | |
| tree | 90f829950651461c6265f561e0d71d3cbf7bdfe9 /docs/topics/testing | |
| parent | ca46dc323b67ac90d0e8c8290b2bcb6d100c5118 (diff) | |
[1.9.x] Clarified that the test client response content attribute is bytes.
Backport of 484edc81c1ebd195c333f3ea8d3f9ca882a17837 from master
Diffstat (limited to 'docs/topics/testing')
| -rw-r--r-- | docs/topics/testing/tools.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 6a394bb148..107fb6095c 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -54,7 +54,7 @@ Web pages:: 200 >>> response = c.get('/customer/details/') >>> response.content - '<!DOCTYPE html...' + b'<!DOCTYPE html...' As this example suggests, you can instantiate ``Client`` from within a session of the Python interactive interpreter. @@ -439,8 +439,8 @@ Specifically, a ``Response`` object has the following attributes: .. attribute:: content - The body of the response, as a string. This is the final page content as - rendered by the view, or any error message. + The body of the response, as a bytestring. This is the final page + content as rendered by the view, or any error message. .. attribute:: context |
