diff options
| author | Kit Randel | 2013-10-25 11:45:33 +1300 |
|---|---|---|
| committer | Kit Randel | 2013-10-25 11:45:33 +1300 |
| commit | 7d5499bcac379a506f78fc0065ebe31c8d01240f (patch) | |
| tree | 31fb89a33aeb2fa2635cb441e3b430371c898312 /docs/api-guide/testing.md | |
| parent | 3c86e25b7674dcf53697556ce213e0b3df950016 (diff) | |
| download | django-rest-framework-7d5499bcac379a506f78fc0065ebe31c8d01240f.tar.bz2 | |
In the API test client example 'data' was not defined. There's also no
need to define 'expected' as we can just test against the dict.
Diffstat (limited to 'docs/api-guide/testing.md')
| -rw-r--r-- | docs/api-guide/testing.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api-guide/testing.md b/docs/api-guide/testing.md index 35c1f766..4a8a9168 100644 --- a/docs/api-guide/testing.md +++ b/docs/api-guide/testing.md @@ -205,10 +205,10 @@ You can use any of REST framework's test case classes as you would for the regul Ensure we can create a new account object. """ url = reverse('account-list') - expected = {'name': 'DabApps'} + data = {'name': 'DabApps'} response = self.client.post(url, data, format='json') self.assertEqual(response.status_code, status.HTTP_201_CREATED) - self.assertEqual(response.data, expected) + self.assertEqual(response.data, data) --- |
