Update Folder creation and Tag creation API calls to return the id of the created instances.
This commit is contained in:
@@ -34,10 +34,13 @@ class FolderAPITestCase(APITestCase):
|
||||
)
|
||||
|
||||
def test_folder_create(self):
|
||||
self.client.post(
|
||||
response = self.client.post(
|
||||
reverse('rest_api:folder-list'), {'label': TEST_FOLDER_LABEL}
|
||||
)
|
||||
|
||||
self.assertEqual(response.data['id'], 1)
|
||||
self.assertEqual(response.data['label'], TEST_FOLDER_LABEL)
|
||||
|
||||
folder = Folder.objects.first()
|
||||
|
||||
self.assertEqual(Folder.objects.count(), 1)
|
||||
|
||||
Reference in New Issue
Block a user