summaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-10-25 22:35:32 -0300
committerVictor Shyba <victor1984@riseup.net>2017-10-27 16:01:48 -0300
commit5faf22e4603d8130d11890f43f2f002821e8a976 (patch)
tree8e0a849b96d1540e4d2c695abb000eca3534a480 /tests/server
parent3230c9388729ae784c05575a2021c9d0995faa13 (diff)
[refactor] add a table for sync_status
As defined in #8970, this table and the new module will ease adding sync features such as priority queues and streaming. --Resolves: #8970
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/test_blobs_server.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/server/test_blobs_server.py b/tests/server/test_blobs_server.py
index c4a00ab5..1d66d0ef 100644
--- a/tests/server/test_blobs_server.py
+++ b/tests/server/test_blobs_server.py
@@ -48,7 +48,7 @@ def sleep(x):
class BlobServerTestCase(unittest.TestCase):
def setUp(self):
- client_blobs.MAX_WAIT = 0.1
+ client_blobs.sync.MAX_WAIT = 0.1
root = server_blobs.BlobsResource("filesystem", self.tempdir)
self.site = Site(root)
self.port = reactor.listenTCP(0, self.site, interface='127.0.0.1')
@@ -261,6 +261,8 @@ class BlobServerTestCase(unittest.TestCase):
self.addCleanup(manager.close)
blob_id = 'local_only_blob_id'
yield manager.local.put(blob_id, BytesIO("X"), size=1)
+ pending = SyncStatus.PENDING_UPLOAD
+ yield manager.local.update_sync_status(blob_id, pending)
yield manager.send_missing()
result = yield manager._download_and_decrypt(blob_id)
self.assertIsNotNone(result)
@@ -274,6 +276,8 @@ class BlobServerTestCase(unittest.TestCase):
self.addCleanup(manager.close)
blob_id = 'remote_only_blob_id'
yield manager.local.put(blob_id, BytesIO("X"), size=1)
+ pending = SyncStatus.PENDING_UPLOAD
+ yield manager.local.update_sync_status(blob_id, pending)
yield self.port.stopListening()
d = manager.send_missing()