aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorKit Randel2013-10-25 11:45:33 +1300
committerKit Randel2013-10-25 11:45:33 +1300
commit7d5499bcac379a506f78fc0065ebe31c8d01240f (patch)
tree31fb89a33aeb2fa2635cb441e3b430371c898312 /docs/api-guide
parent3c86e25b7674dcf53697556ce213e0b3df950016 (diff)
downloaddjango-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')
-rw-r--r--docs/api-guide/testing.md4
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)
---