diff options
Diffstat (limited to 'api-guide/testing.html')
| -rw-r--r-- | api-guide/testing.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api-guide/testing.html b/api-guide/testing.html index c40bc2f6..74789fcb 100644 --- a/api-guide/testing.html +++ b/api-guide/testing.html @@ -357,11 +357,11 @@ class AccountTests(APITestCase): <h1 id="testing-responses">Testing responses</h1> <h2 id="checking-the-response-data">Checking the response data</h2> <p>When checking the validity of test responses it's often more convenient to inspect the data that the response was created with, rather than inspecting the fully rendered response.</p> -<p>For example, it's easier to inspect <code>request.data</code>:</p> +<p>For example, it's easier to inspect <code>response.data</code>:</p> <pre class="prettyprint lang-py"><code>response = self.client.get('/users/4/') self.assertEqual(response.data, {'id': 4, 'username': 'lauren'}) </code></pre> -<p>Instead of inspecting the result of parsing <code>request.content</code>:</p> +<p>Instead of inspecting the result of parsing <code>response.content</code>:</p> <pre class="prettyprint lang-py"><code>response = self.client.get('/users/4/') self.assertEqual(json.loads(response.content), {'id': 4, 'username': 'lauren'}) </code></pre> |
