diff options
Diffstat (limited to 'testing/tests/server')
-rw-r--r-- | testing/tests/server/test_blobs_server.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py index 0db64256..0696e14b 100644 --- a/testing/tests/server/test_blobs_server.py +++ b/testing/tests/server/test_blobs_server.py @@ -128,6 +128,19 @@ class BlobServerTestCase(unittest.TestCase): @defer.inlineCallbacks @pytest.mark.usefixtures("method_tmpdir") + def test_list_with_count_parameter(self): + manager = BlobManager('', self.uri, self.secret, + self.secret, 'user') + deferreds = [] + for i in range(10): + deferreds.append(manager._encrypt_and_upload(str(i), BytesIO("1"))) + yield defer.gatherResults(deferreds) + + result = yield manager.remote_list(only_count=True) + self.assertEquals({"count": len(deferreds)}, result) + + @defer.inlineCallbacks + @pytest.mark.usefixtures("method_tmpdir") def test_list_restricted_by_namespace(self): manager = BlobManager('', self.uri, self.secret, self.secret, 'user') |