diff --git a/pinry/api/api.py b/pinry/api/api.py index 81789ae..88c73d3 100644 --- a/pinry/api/api.py +++ b/pinry/api/api.py @@ -84,4 +84,5 @@ class PinResource(ModelResource): queryset = Pin.objects.all() resource_name = 'pin' include_resource_uri = False + always_return_data = True authorization = DjangoAuthorization() diff --git a/pinry/api/tests.py b/pinry/api/tests.py index 63c7807..89a5638 100644 --- a/pinry/api/tests.py +++ b/pinry/api/tests.py @@ -79,6 +79,7 @@ class PinResourceTest(ResourceTestCase): 'tags': ['random', 'tags'], } response = self.api_client.post('/api/v1/pin/', data=post_data) + self.assertEqual(self.deserialize(response)['id'], 3) self.assertHttpCreated(response) # A number of Image objects should stay the same as we are using an existing image self.assertEqual(Image.objects.count(), 2)