summaryrefslogtreecommitdiff
path: root/tests/__init__.py
diff options
context:
space:
mode:
authorDarshan Rai <darshanjrai@gmail.com>2018-12-03 05:58:36 +0530
committerSelwin Ong <selwin.ong@gmail.com>2018-12-03 07:28:36 +0700
commitada2ad03ca959e993a86ce7259d6d96ef91c8bfa (patch)
treec5929f749c3c7a89159f36a27192836b9223c413 /tests/__init__.py
parent6559b0ffd75eee1dbd2bab3b75b4074479866fd8 (diff)
downloadrq-ada2ad03ca959e993a86ce7259d6d96ef91c8bfa.tar.gz
modify zadd calls for redis-py 3.0 (#1016)
* modify zadd calls for redis-py 3.0 redis-py 3.0 changes the zadd interface that accepts a single mapping argument that is expected to be a dict. https://github.com/andymccurdy/redis-py#mset-msetnx-and-zadd * change FailedQueue.push_job_id to always push a str redis-py 3.0 does not attempt to cast values to str and is left to the user. * remove Redis connection patching Since in redis-py 3.0, Redis == StrictRedis class, we no longer need to patch _zadd and other methods. Ref: https://github.com/rq/rq/pull/1016#issuecomment-441010847
Diffstat (limited to 'tests/__init__.py')
-rw-r--r--tests/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/__init__.py b/tests/__init__.py
index fea12b5..c916a30 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -4,7 +4,7 @@ from __future__ import (absolute_import, division, print_function,
import logging
-from redis import StrictRedis
+from redis import Redis
from rq import pop_connection, push_connection
from rq.compat import is_python_version
@@ -19,7 +19,7 @@ def find_empty_redis_database():
will use/connect it when no keys are in there.
"""
for dbnum in range(4, 17):
- testconn = StrictRedis(db=dbnum)
+ testconn = Redis(db=dbnum)
empty = testconn.dbsize() == 0
if empty:
return testconn