Merge lp:~elopio/cloudspacesclient/download_file into lp:cloudspacesclient

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 33
Merged at revision: 35
Proposed branch: lp:~elopio/cloudspacesclient/download_file
Merge into: lp:cloudspacesclient
Diff against target: 28 lines (+11/-0)
1 file modified
src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py (+11/-0)
To merge this branch: bzr merge lp:~elopio/cloudspacesclient/download_file
Reviewer Review Type Date Requested Status
Richard Huddie (community) Approve
Review via email: mp+197795@code.launchpad.net

Commit message

Added the test to download an empty file.

To post a comment you must log in.
31. By Leo Arias

Reverted wrong changes.

32. By Leo Arias

Reverted wrong tests.

33. By Leo Arias

Merged with trunk

Revision history for this message
Richard Huddie (rhuddie) :
review: Approve

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-04 16:26:11 +0000
3+++ src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py 2013-12-04 20:31:30 +0000
4@@ -285,6 +285,16 @@
5 # TODO check the user_id. --elopio - 2013-11-27
6 # TODO Check the volume_id field. --elopio - 2013-11-27
7
8+ def test_download_empty_file(self):
9+ test_file_name = 'test_file_to_download.txt'
10+ root_node_id, root_path = self._get_root_info()
11+ create_metadata = self.cloudspaces_api_client.make_file(
12+ root_node_id, test_file_name)
13+ file_node_id = create_metadata.get('node_id')
14+
15+ contents = list(self.cloudspaces_api_client.get_file(file_node_id))
16+ self.assertEqual(contents, [])
17+
18 def test_delete_file(self):
19 root_node_id, root_path = self._get_root_info()
20 test_file_name = 'test_file_to_delete.txt'
21@@ -293,6 +303,7 @@
22 create_metadata = self.cloudspaces_api_client.make_file(
23 root_node_id, test_file_name)
24 file_node_id = create_metadata.get('node_id')
25+
26 delete_metadata = self.cloudspaces_api_client.delete(file_node_id)
27
28 # We don't check the version of the file after it is deleted, as it

Subscribers

People subscribed via source and target branches

to all changes: