diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-05-04 04:58:15 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-05-04 04:58:15 -0300 |
commit | 194900221cdf964bd3fc3bfd812a326fe458f425 (patch) | |
tree | ea75df5fb3e04a239e04ca71ba958959ed8202db /testing/tests/blobs | |
parent | 8a6c8274c37b045d1a6198b6ff585940811da18a (diff) |
[tests] improve readability
Diffstat (limited to 'testing/tests/blobs')
-rw-r--r-- | testing/tests/blobs/test_blob_manager.py | 3 | ||||
-rw-r--r-- | testing/tests/blobs/test_sqlcipher_client_backend.py | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/testing/tests/blobs/test_blob_manager.py b/testing/tests/blobs/test_blob_manager.py index 4d04e09d..85f08d1e 100644 --- a/testing/tests/blobs/test_blob_manager.py +++ b/testing/tests/blobs/test_blob_manager.py @@ -125,8 +125,7 @@ class BlobManagerTestCase(unittest.TestCase): doc1 = BlobDoc(BytesIO(content), 'existing_id') yield self.manager.put(doc1, len(content)) doc2 = BlobDoc(BytesIO(content), 'existing_id') - # reset mock, so we can check that upload wasnt called - self.manager._encrypt_and_upload = Mock(return_value=None) + self.manager._encrypt_and_upload.reset_mock() with pytest.raises(BlobAlreadyExistsError): yield self.manager.put(doc2, len(content)) self.assertFalse(self.manager._encrypt_and_upload.called) diff --git a/testing/tests/blobs/test_sqlcipher_client_backend.py b/testing/tests/blobs/test_sqlcipher_client_backend.py index 45488a9e..1ce0af77 100644 --- a/testing/tests/blobs/test_sqlcipher_client_backend.py +++ b/testing/tests/blobs/test_sqlcipher_client_backend.py @@ -33,15 +33,15 @@ class SQLBackendTestCase(unittest.TestCase): @defer.inlineCallbacks @pytest.mark.usefixtures("method_tmpdir") - def test_get_inexistent(self): - bad_blob_id = 'inexsistent_id' + def test_get_inexisting(self): + bad_blob_id = 'inexsisting_id' self.assertFalse((yield self.local.exists(bad_blob_id))) result = yield self.local.get(bad_blob_id) self.assertIsNone(result) @defer.inlineCallbacks @pytest.mark.usefixtures("method_tmpdir") - def test_get_existent(self): + def test_get_existing(self): blob_id = 'blob_id' content = "x" yield self.local.put(blob_id, BytesIO(content), len(content)) |