Added album add/remove endpoints

This commit is contained in:
sneakypete81 2013-09-08 17:22:25 +01:00
parent 3bd733b229
commit f8aecde457
13 changed files with 273 additions and 79 deletions

View file

@ -66,13 +66,16 @@ class TestActionCreate(TestActions):
@mock.patch.object(trovebox.Trovebox, 'post')
def test_action_create_invalid_type(self, mock_post):
"""Check that an exception is raised if an action is created on a non photo object"""
with self.assertRaises(NotImplementedError):
"""
Check that an exception is raised if an action is created on an
invalid object.
"""
with self.assertRaises(AttributeError):
self.client.action.create(target=object(), foo="bar")
@mock.patch.object(trovebox.Trovebox, 'post')
def test_action_create_invalid_return_type(self, mock_post):
"""Check that an exception is raised if an non photo object is returned"""
"""Check that an exception is raised if an invalid object is returned"""
mock_post.return_value = self._return_value({"target": "test",
"target_type": "invalid"})
with self.assertRaises(NotImplementedError):