From d062f1cd53e93cf88f28b8469bcfeff2b37d113b Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 20 Apr 2017 03:56:32 -0300 Subject: [feature] use Twisted getProcessOutput on backend This makes process communication async during quota measurement, as specified on #8832 - Related: #8832 --- testing/tests/blobs/test_fs_backend.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'testing') 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() -- cgit v1.2.3