summaryrefslogtreecommitdiff
path: root/testing/tests/perf/test_sqlcipher.py
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2016-08-22 19:22:15 -0300
committerVictor Shyba <victor.shyba@gmail.com>2016-08-22 19:22:15 -0300
commita64095ad5e6c6a36221444a34d8d56c0ae1c6150 (patch)
treecfa9a9f2df857a58ab990d63a0896b029688c7a2 /testing/tests/perf/test_sqlcipher.py
parentbad25ba9a5e7e5296b79544f50cafc47599a76b9 (diff)
[test] refactor load_up for readability
defer parameter wasnt clear
Diffstat (limited to 'testing/tests/perf/test_sqlcipher.py')
-rw-r--r--testing/tests/perf/test_sqlcipher.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/testing/tests/perf/test_sqlcipher.py b/testing/tests/perf/test_sqlcipher.py
index 511080a1..1fce1c3e 100644
--- a/testing/tests/perf/test_sqlcipher.py
+++ b/testing/tests/perf/test_sqlcipher.py
@@ -8,15 +8,9 @@ from twisted.internet.defer import gatherResults
def load_up(client, amount, size, defer=True):
content = 'x'*size
- deferreds = []
- # create a bunch of local documents
- for i in xrange(amount):
- d = client.create_doc({'content': content})
- deferreds.append(d)
+ results = [client.create_doc({'content': content}) for _ in xrange(amount)]
if defer:
- d = gatherResults(deferreds)
- d.addCallback(lambda _: None)
- return d
+ return gatherResults(results)
def build_test_sqlcipher_async_create(amount, size):