In the API, return Pin resource upon creation

Fixes #68
This commit is contained in:
Krzysztof Klimonda
2013-02-26 02:10:08 -08:00
parent 82352d6980
commit 974d2a8720
2 changed files with 2 additions and 0 deletions

View File

@@ -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)