diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-03-27 22:02:43 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-04-10 12:51:24 +0200 |
commit | 93fa3fe830b188f3a135fd85ac593bde2c755c2e (patch) | |
tree | d0c155804e7b23f0d53f69760b4742947f05008f /testing/tests/server/test_blobs_server.py | |
parent | a95a015564b8704de4cbf55f6c7439fbecd457c4 (diff) |
[refactor] use fixed rev and remove doc_id (blobs)
doc_id wasn't being stored, loaded or used anywhere except for
authentication. This commit removes it and uses a fixed value for rev
since blobs is supposed to be immutable.
- Resolves: #8813
Diffstat (limited to 'testing/tests/server/test_blobs_server.py')
-rw-r--r-- | testing/tests/server/test_blobs_server.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py index 96037ea2..a0306504 100644 --- a/testing/tests/server/test_blobs_server.py +++ b/testing/tests/server/test_blobs_server.py @@ -46,9 +46,8 @@ class BlobServerTestCase(unittest.TestCase): manager = BlobManager('', self.uri, self.secret, self.secret, 'user') fd = BytesIO("save me") - yield manager._encrypt_and_upload('blob_id', 'mydoc', '1', fd) - blob, size = yield manager._download_and_decrypt('blob_id', - 'mydoc', '1') + yield manager._encrypt_and_upload('blob_id', fd) + blob, size = yield manager._download_and_decrypt('blob_id') self.assertEquals(blob.getvalue(), "save me") @defer.inlineCallbacks @@ -56,8 +55,8 @@ class BlobServerTestCase(unittest.TestCase): def test_upload_changes_remote_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")) + yield manager._encrypt_and_upload('blob_id1', BytesIO("1")) + yield manager._encrypt_and_upload('blob_id2', BytesIO("2")) blobs_list = yield manager.remote_list() self.assertEquals(set(['blob_id1', 'blob_id2']), set(blobs_list)) @@ -67,7 +66,7 @@ class BlobServerTestCase(unittest.TestCase): manager = BlobManager('', self.uri, self.secret, self.secret, 'user') fd = BytesIO("save me") - yield manager._encrypt_and_upload('blob_id', 'mydoc', '1', fd) + yield manager._encrypt_and_upload('blob_id', fd) fd = BytesIO("save me") with pytest.raises(BlobAlreadyExistsError): - yield manager._encrypt_and_upload('blob_id', 'mydoc', '1', fd) + yield manager._encrypt_and_upload('blob_id', fd) |