From 00efc91ef97870d6c1c3d00c3fd2d5c4aa92588f Mon Sep 17 00:00:00 2001 From: sneakypete81 Date: Sat, 14 Sep 2013 11:53:11 +0100 Subject: [PATCH] Use pathOriginal for upload/delete tests. Hosted site returns 403 not 404 for a missing source photo. --- tests/functional/test_photos.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_photos.py b/tests/functional/test_photos.py index 30e3c98..edb4978 100644 --- a/tests/functional/test_photos.py +++ b/tests/functional/test_photos.py @@ -82,11 +82,12 @@ class TestPhotos(test_base.TestBase): allowDuplicate=True, permission=True) # Check that the photo can be downloaded - self.assertEqual(requests.get(photo.pathDownload).status_code, 200) + self.assertEqual(requests.get(photo.pathOriginal).status_code, 200) # Delete the source and check that the source file no longer exists photo.delete_source() - self.assertEqual(requests.get(photo.pathDownload).status_code, 404) + self.assertIn(requests.get(photo.pathOriginal).status_code, + [403, 404]) # Put the environment back the way we found it photo.delete() @@ -107,7 +108,7 @@ class TestPhotos(test_base.TestBase): # Make an existing photo public self.photos[0].update(permission=True) # Upload a duplicate of an existing photo - self.client.photo.upload_from_url(self.photos[0].pathDownload, + self.client.photo.upload_from_url(self.photos[0].pathOriginal, allowDuplicate=True) # Check there are now four photos photos = self.client.photos.list()