summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/soledad/client/_db/blobs/__init__.py3
-rw-r--r--src/leap/soledad/server/_blobs.py2
-rw-r--r--tests/blobs/test_blob_manager.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/soledad/client/_db/blobs/__init__.py b/src/leap/soledad/client/_db/blobs/__init__.py
index 3c7492c6..4699e0a0 100644
--- a/src/leap/soledad/client/_db/blobs/__init__.py
+++ b/src/leap/soledad/client/_db/blobs/__init__.py
@@ -221,7 +221,8 @@ class BlobManager(BlobsSynchronizer):
Optional parameter to restrict operation to a given namespace.
:type namespace: str
"""
- return self.semaphore.run(self._put, doc, size, namespace, local_only)
+ return self.semaphore.run(
+ self._put, doc, size, namespace, local_only=local_only)
@defer.inlineCallbacks
def _put(self, doc, size, namespace, local_only=False):
diff --git a/src/leap/soledad/server/_blobs.py b/src/leap/soledad/server/_blobs.py
index f44afd94..d608845d 100644
--- a/src/leap/soledad/server/_blobs.py
+++ b/src/leap/soledad/server/_blobs.py
@@ -136,12 +136,12 @@ class FilesystemBlobsBackend(object):
if not os.path.isfile(blob_path):
request.setResponseCode(404)
return "Blob doesn't exists: %s" % blob_id
+ self.__touch(blob_path + '.deleted')
os.unlink(blob_path)
try:
os.unlink(blob_path + '.flags')
except Exception:
pass
- self.__touch(blob_path + '.deleted')
def get_blob_size(user, blob_id, namespace=''):
raise NotImplementedError
diff --git a/tests/blobs/test_blob_manager.py b/tests/blobs/test_blob_manager.py
index c7bbb0d3..76ebcd03 100644
--- a/tests/blobs/test_blob_manager.py
+++ b/tests/blobs/test_blob_manager.py
@@ -184,7 +184,7 @@ class BlobManagerTestCase(unittest.TestCase):
@defer.inlineCallbacks
@pytest.mark.usefixtures("method_tmpdir")
- def test_offline_delete_marks_as_pending_download(self):
+ def test_offline_delete_marks_as_pending_delete(self):
deletion_failure = defer.fail(Exception())
self.manager._encrypt_and_upload = Mock(return_value=None)
self.manager._delete_from_remote = Mock(return_value=deletion_failure)