diff options
| author | Tom Christie | 2014-02-20 14:55:10 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-02-20 14:55:10 +0000 |
| commit | 33f1cd24cd84cc7e0ec2a76d1d8fed04dd401435 (patch) | |
| tree | 9133e49c5a33b7700d987e94b78055d2b92e2258 /api-guide/testing.html | |
| parent | a7dad0da01613595b33793979a45e64e3a7a9ef7 (diff) | |
| download | django-rest-framework-33f1cd24cd84cc7e0ec2a76d1d8fed04dd401435.tar.bz2 | |
Latest docs build
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> |
