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
=== modified file 'src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py'
--- src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py 2013-12-04 16:26:11 +0000
+++ src/cloudspacesclient/tests/conformance/test_cloudspaces_api.py 2013-12-04 20:31:30 +0000
@@ -285,6 +285,16 @@
285 # TODO check the user_id. --elopio - 2013-11-27285 # TODO check the user_id. --elopio - 2013-11-27
286 # TODO Check the volume_id field. --elopio - 2013-11-27286 # TODO Check the volume_id field. --elopio - 2013-11-27
287287
288 def test_download_empty_file(self):
289 test_file_name = 'test_file_to_download.txt'
290 root_node_id, root_path = self._get_root_info()
291 create_metadata = self.cloudspaces_api_client.make_file(
292 root_node_id, test_file_name)
293 file_node_id = create_metadata.get('node_id')
294
295 contents = list(self.cloudspaces_api_client.get_file(file_node_id))
296 self.assertEqual(contents, [])
297
288 def test_delete_file(self):298 def test_delete_file(self):
289 root_node_id, root_path = self._get_root_info()299 root_node_id, root_path = self._get_root_info()
290 test_file_name = 'test_file_to_delete.txt'300 test_file_name = 'test_file_to_delete.txt'
@@ -293,6 +303,7 @@
293 create_metadata = self.cloudspaces_api_client.make_file(303 create_metadata = self.cloudspaces_api_client.make_file(
294 root_node_id, test_file_name)304 root_node_id, test_file_name)
295 file_node_id = create_metadata.get('node_id')305 file_node_id = create_metadata.get('node_id')
306
296 delete_metadata = self.cloudspaces_api_client.delete(file_node_id)307 delete_metadata = self.cloudspaces_api_client.delete(file_node_id)
297308
298 # We don't check the version of the file after it is deleted, as it309 # 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: