mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
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.
This commit is contained in:
parent
3c86e25b76
commit
7d5499bcac
|
@ -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)
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user