From 93fa3fe830b188f3a135fd85ac593bde2c755c2e Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 27 Mar 2017 22:02:43 -0300 Subject: [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 --- testing/tests/server/test_blobs_server.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'testing/tests/server') 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) -- cgit v1.2.3