summaryrefslogtreecommitdiff
path: root/tests/__init__.py
diff options
context:
space:
mode:
authorSelwin Ong <selwin.ong@gmail.com>2018-05-01 07:20:45 +0700
committerSelwin Ong <selwin.ong@gmail.com>2018-05-01 07:20:45 +0700
commit63a04d275efa18090a5b640cb90eade95f6340de (patch)
treed8dc8fcd60e67865d3aaa75a8710ab20692eee0f /tests/__init__.py
parentbc8d4a087ae7be0f821ac7620bf50127773f9123 (diff)
downloadrq-63a04d275efa18090a5b640cb90eade95f6340de.tar.gz
Use dbsize() to test for empty Redis database
Diffstat (limited to 'tests/__init__.py')
-rw-r--r--tests/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/__init__.py b/tests/__init__.py
index c9acfa7..fea12b5 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -20,7 +20,7 @@ def find_empty_redis_database():
"""
for dbnum in range(4, 17):
testconn = StrictRedis(db=dbnum)
- empty = len(testconn.keys('*')) == 0
+ empty = testconn.dbsize() == 0
if empty:
return testconn
assert False, 'No empty Redis database found to run tests in.'