summaryrefslogtreecommitdiff
path: root/testing/tests
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-04-20 03:56:32 -0300
committerKali Kaneko <kali@leap.se>2017-04-26 00:06:10 +0200
commitd062f1cd53e93cf88f28b8469bcfeff2b37d113b (patch)
tree789f93b6851513b593c3352133ae45f108d2ad82 /testing/tests
parent89cd6184b2fdf2eec16ed31c108966e68f6446b1 (diff)
[feature] use Twisted getProcessOutput on backend
This makes process communication async during quota measurement, as specified on #8832 - Related: #8832
Diffstat (limited to 'testing/tests')
-rw-r--r--testing/tests/blobs/test_fs_backend.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/testing/tests/blobs/test_fs_backend.py b/testing/tests/blobs/test_fs_backend.py
index 78878063..6da22621 100644
--- a/testing/tests/blobs/test_fs_backend.py
+++ b/testing/tests/blobs/test_fs_backend.py
@@ -62,7 +62,7 @@ class FilesystemBackendTestCase(unittest.TestCase):
backend = _blobs.FilesystemBlobsBackend()
backend._get_path = Mock(return_value='path')
request = DummyRequest([''])
- result = backend.write_blob('user', 'blob_id', request)
+ result = yield backend.write_blob('user', 'blob_id', request)
self.assertEquals(result, "Blob already exists: blob_id")
self.assertEquals(request.responseCode, 409)
@@ -76,11 +76,10 @@ class FilesystemBackendTestCase(unittest.TestCase):
backend.get_total_storage = lambda x: 100
backend.quota = 90
- backend.write_blob('user', 'blob_id', request)
+ yield backend.write_blob('user', 'blob_id', request)
request.setResponseCode.assert_called_once_with(507)
request.write.assert_called_once_with('Quota Exceeded!')
- request.finish.assert_called_once()
def test_get_path_partitioning(self):
backend = _blobs.FilesystemBlobsBackend()