diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-07-13 02:14:06 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-07-21 10:58:47 -0300 |
commit | f4ada0de252a44c21125811d19ab0d4d341381a3 (patch) | |
tree | 751c7f797cb8f64dad92d6e887c3f10a87dea9c1 /testing | |
parent | 5d521e5a1c5fdd4cf926062dc26147dbcd110b05 (diff) |
[feature] make DELETE support namespaces on client
Using a parameter, just like the other methods are doing.
-- Resolves: #8873
Diffstat (limited to 'testing')
-rw-r--r-- | testing/tests/server/test_blobs_server.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py index 0696e14b..249d76bc 100644 --- a/testing/tests/server/test_blobs_server.py +++ b/testing/tests/server/test_blobs_server.py @@ -203,3 +203,17 @@ class BlobServerTestCase(unittest.TestCase): yield manager._delete_from_remote('blob_id1') blobs_list = yield manager.remote_list() self.assertEquals(set(['blob_id2']), set(blobs_list)) + + @defer.inlineCallbacks + @pytest.mark.usefixtures("method_tmpdir") + def test_upload_then_delete_updates_list_using_namespace(self): + manager = BlobManager('', self.uri, self.secret, + self.secret, 'user') + namespace = 'special_archives' + yield manager._encrypt_and_upload('blob_id1', BytesIO("1"), + namespace=namespace) + yield manager._encrypt_and_upload('blob_id2', BytesIO("2"), + namespace=namespace) + yield manager._delete_from_remote('blob_id1', namespace=namespace) + blobs_list = yield manager.remote_list(namespace=namespace) + self.assertEquals(set(['blob_id2']), set(blobs_list)) |