summaryrefslogtreecommitdiff
path: root/testing/tests/server
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-03-23 20:33:20 -0300
committerdrebs <drebs@leap.se>2017-04-04 18:27:38 +0200
commit26a65d100f91883027c17c219d018461968eda65 (patch)
tree1c2cdb4a8438aa730f4ac064cfe15ebf843e0740 /testing/tests/server
parent45b73d58930a2a66394a6797c94a50c34e8f96e7 (diff)
[feature] add blobs listing
Diffstat (limited to 'testing/tests/server')
-rw-r--r--testing/tests/server/test_blobs_server.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py
index 1f35c285..3c534c0c 100644
--- a/testing/tests/server/test_blobs_server.py
+++ b/testing/tests/server/test_blobs_server.py
@@ -53,6 +53,17 @@ class BlobServerTestCase(unittest.TestCase):
@defer.inlineCallbacks
@pytest.mark.usefixtures("method_tmpdir")
+ def test_upload_list(self):
+ manager = BlobManager('', self.uri, self.secret,
+ self.secret, 'user')
+ yield manager._encrypt_and_upload('blob_id1', '1', '1', BytesIO("1"))
+ yield manager._encrypt_and_upload('blob_id2', '2', '2', BytesIO("2"))
+ blobs_list = yield manager.list()
+ assert len(blobs_list) == 2
+ assert 'blob_id1' in blobs_list and 'blob_id2' in blobs_list
+
+ @defer.inlineCallbacks
+ @pytest.mark.usefixtures("method_tmpdir")
def test_upload_deny_duplicates(self):
manager = BlobManager('', self.uri, self.secret,
self.secret, 'user')