summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-09-25 14:15:20 -0300
committerVictor Shyba <victor1984@riseup.net>2017-10-05 05:41:40 -0300
commit0c9bbaf5519e76841d141865f6ca76cba8d01d67 (patch)
treeb2ef44dfe8af7045626204de9c454fdeb7709498 /tests
parent0e2dca49d70082f51c43cd6873f36fee6a9b62ad (diff)
[feature] send/fetch missing using local statuses
Instead of querying the server, fetch_missing and send_missing now uses the PENDING_DOWNLOAD and PENDING_UPLOAD statuses to guide itself on what to do. This allows the sync mechanism to control when/how to query data from server and reuse the query data during the sync. -- Related: #8822
Diffstat (limited to 'tests')
-rw-r--r--tests/server/test_blobs_server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/server/test_blobs_server.py b/tests/server/test_blobs_server.py
index c628ae78..7e8533fe 100644
--- a/tests/server/test_blobs_server.py
+++ b/tests/server/test_blobs_server.py
@@ -257,13 +257,13 @@ class BlobServerTestCase(unittest.TestCase):
@defer.inlineCallbacks
@pytest.mark.usefixtures("method_tmpdir")
- def test_fetch_missing(self):
+ def test_sync_fetch_missing(self):
manager = BlobManager(self.tempdir, self.uri, self.secret,
self.secret, uuid4().hex)
self.addCleanup(manager.close)
blob_id = 'remote_only_blob_id'
yield manager._encrypt_and_upload(blob_id, BytesIO("X"))
- yield manager.fetch_missing()
+ yield manager.sync()
result = yield manager.local.get(blob_id)
self.assertIsNotNone(result)
self.assertEquals(result.getvalue(), "X")