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/blobs/test_fs_backend.py | |
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/blobs/test_fs_backend.py')
-rw-r--r-- | testing/tests/blobs/test_fs_backend.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/tests/blobs/test_fs_backend.py b/testing/tests/blobs/test_fs_backend.py index f6f2db2d..83a5708e 100644 --- a/testing/tests/blobs/test_fs_backend.py +++ b/testing/tests/blobs/test_fs_backend.py @@ -120,3 +120,11 @@ class FilesystemBackendTestCase(unittest.TestCase): yield backend.write_blob('valid', '../../../', DummyRequest([''])) with pytest.raises(Exception): yield backend.write_blob('../../../', 'valid', DummyRequest([''])) + + @pytest.mark.usefixtures("method_tmpdir") + @mock.patch('leap.soledad.server._blobs.os.unlink') + def test_delete_blob(self, unlink_mock): + backend = _blobs.FilesystemBlobsBackend(self.tempdir) + backend.delete_blob('user', 'blob_id') + unlink_mock.assert_called_once_with(backend._get_path('user', + 'blob_id')) |