No need to define NotImplementedError, Python has its own.

This commit is contained in:
sneakypete81 2013-05-15 19:04:30 +01:00
parent 20e526c28c
commit b124b48a75
3 changed files with 6 additions and 11 deletions

View file

@ -9,8 +9,3 @@ class OpenPhotoDuplicateError(OpenPhotoError):
class OpenPhoto404Error(Exception): class OpenPhoto404Error(Exception):
""" Indicates that an Http 404 error code was received (resource not found) """ """ Indicates that an Http 404 error code was received (resource not found) """
pass pass
class NotImplementedError(OpenPhotoError):
""" Indicates that the API function has not yet been coded - please help! """
pass

View file

@ -68,15 +68,15 @@ class TestAlbums(tests.test_base.TestBase):
def test_form(self): def test_form(self):
""" If album.form gets implemented, write a test! """ """ If album.form gets implemented, write a test! """
with self.assertRaises(openphoto.NotImplementedError): with self.assertRaises(NotImplementedError):
self.client.album.form(None) self.client.album.form(None)
def test_add_photos(self): def test_add_photos(self):
""" If album.add_photos gets implemented, write a test! """ """ If album.add_photos gets implemented, write a test! """
with self.assertRaises(openphoto.NotImplementedError): with self.assertRaises(NotImplementedError):
self.client.album.add_photos(None, None) self.client.album.add_photos(None, None)
def test_remove_photos(self): def test_remove_photos(self):
""" If album.remove_photos gets implemented, write a test! """ """ If album.remove_photos gets implemented, write a test! """
with self.assertRaises(openphoto.NotImplementedError): with self.assertRaises(NotImplementedError):
self.client.album.remove_photos(None, None) self.client.album.remove_photos(None, None)

View file

@ -142,17 +142,17 @@ class TestPhotos(tests.test_base.TestBase):
def test_replace(self): def test_replace(self):
""" If photo.replace gets implemented, write a test! """ """ If photo.replace gets implemented, write a test! """
with self.assertRaises(openphoto.NotImplementedError): with self.assertRaises(NotImplementedError):
self.client.photo.replace(None, None) self.client.photo.replace(None, None)
def test_replace_encoded(self): def test_replace_encoded(self):
""" If photo.replace_encoded gets implemented, write a test! """ """ If photo.replace_encoded gets implemented, write a test! """
with self.assertRaises(openphoto.NotImplementedError): with self.assertRaises(NotImplementedError):
self.client.photo.replace_encoded(None, None) self.client.photo.replace_encoded(None, None)
def test_dynamic_url(self): def test_dynamic_url(self):
""" If photo.dynamic_url gets implemented, write a test! """ """ If photo.dynamic_url gets implemented, write a test! """
with self.assertRaises(openphoto.NotImplementedError): with self.assertRaises(NotImplementedError):
self.client.photo.dynamic_url(None) self.client.photo.dynamic_url(None)
def test_transform(self): def test_transform(self):