diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-05-02 00:08:27 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-05-02 00:18:32 -0300 |
commit | 8a6c8274c37b045d1a6198b6ff585940811da18a (patch) | |
tree | e9f9cbaf6ed77d1cc5c643df949cc904aafaaeeb /testing/tests/server | |
parent | 03617fc9378b9f8cf6fec77bd53c573131ade75b (diff) |
[feature] add and integrate DELETE to blobs server
Add a DELETE method for blobs server and integrate it into client's
BlobManager.
- Resolves: #8846
Diffstat (limited to 'testing/tests/server')
-rw-r--r-- | testing/tests/server/test_blobs_server.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py index cd39833f..2fd66224 100644 --- a/testing/tests/server/test_blobs_server.py +++ b/testing/tests/server/test_blobs_server.py @@ -100,3 +100,14 @@ class BlobServerTestCase(unittest.TestCase): result = yield manager.local.get(blob_id) self.assertIsNotNone(result) self.assertEquals(result.getvalue(), "X") + + @defer.inlineCallbacks + @pytest.mark.usefixtures("method_tmpdir") + def test_upload_then_delete_updates_list(self): + manager = BlobManager('', self.uri, self.secret, + self.secret, 'user') + yield manager._encrypt_and_upload('blob_id1', BytesIO("1")) + yield manager._encrypt_and_upload('blob_id2', BytesIO("2")) + yield manager._delete_from_remote('blob_id1') + blobs_list = yield manager.remote_list() + self.assertEquals(set(['blob_id2']), set(blobs_list)) |