summaryrefslogtreecommitdiff
path: root/testing/tests/blobs/test_fs_backend.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/blobs/test_fs_backend.py')
-rw-r--r--testing/tests/blobs/test_fs_backend.py8
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'))