Commit 57c41b94 by Carlton Gibson

Merge pull request #1203 from squidsoup/doc/testing-example

Docs: Fix for API test client example
parents 3c86e25b 7d5499bc
......@@ -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)
---
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment