mirror of
https://github.com/pinry/pinry.git
synced 2025-11-14 17:05:50 +01:00
@@ -84,4 +84,5 @@ class PinResource(ModelResource):
|
|||||||
queryset = Pin.objects.all()
|
queryset = Pin.objects.all()
|
||||||
resource_name = 'pin'
|
resource_name = 'pin'
|
||||||
include_resource_uri = False
|
include_resource_uri = False
|
||||||
|
always_return_data = True
|
||||||
authorization = DjangoAuthorization()
|
authorization = DjangoAuthorization()
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class PinResourceTest(ResourceTestCase):
|
|||||||
'tags': ['random', 'tags'],
|
'tags': ['random', 'tags'],
|
||||||
}
|
}
|
||||||
response = self.api_client.post('/api/v1/pin/', data=post_data)
|
response = self.api_client.post('/api/v1/pin/', data=post_data)
|
||||||
|
self.assertEqual(self.deserialize(response)['id'], 3)
|
||||||
self.assertHttpCreated(response)
|
self.assertHttpCreated(response)
|
||||||
# A number of Image objects should stay the same as we are using an existing image
|
# A number of Image objects should stay the same as we are using an existing image
|
||||||
self.assertEqual(Image.objects.count(), 2)
|
self.assertEqual(Image.objects.count(), 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user