Merge lp:~rhuddie/cloudspacesclient/get_invalid_node_id into lp:cloudspacesclient

Proposed by Richard Huddie
Status: Merged
Merged at revision: 48
Proposed branch: lp:~rhuddie/cloudspacesclient/get_invalid_node_id
Merge into: lp:cloudspacesclient
Diff against target: 22 lines (+12/-0)
1 file modified
src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py (+12/-0)
To merge this branch: bzr merge lp:~rhuddie/cloudspacesclient/get_invalid_node_id
Reviewer Review Type Date Requested Status
Leo Arias (community) code review Approve
Review via email: mp+198900@code.launchpad.net

Description of the change

Added 2 negative tests for attempting to get invalid node id with get_file() and get_metadata() methods.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py'
2--- src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py 2013-12-06 19:06:03 +0000
3+++ src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py 2013-12-13 10:12:35 +0000
4@@ -398,6 +398,18 @@
5 with self.assertRaises(cloudspacer.errors.NotFound):
6 self.cloudspaces_api_client.delete(node_id)
7
8+ def test_get_non_existent_file(self):
9+ # use a valid format node id, with dummy data
10+ node_id = '0123456789abcdef0123456789abcdef'
11+ with self.assertRaises(cloudspacer.errors.NotFound):
12+ self.cloudspaces_api_client.get_file(node_id)
13+
14+ def test_get_non_existent_metadata(self):
15+ # use a valid format node id, with dummy data
16+ node_id = '0123456789abcdef0123456789abcdef'
17+ with self.assertRaises(cloudspacer.errors.NotFound):
18+ self.cloudspaces_api_client.get_metadata(node_id)
19+
20 def test_delete_folder_and_children_in_root(self):
21 # create a new parent folder to hold the child items
22 metadata = self.cloudspaces_api_client.make_folder(

Subscribers

People subscribed via source and target branches