Skip to content

Commit bdccdd9

Browse files
committed
Update a test to work with redis-py 4.0
1 parent 9fc7716 commit bdccdd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_fakeredis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5008,10 +5008,10 @@ def test_from_url_with_db_arg(self):
50085008
assert db2.get('foo') == b'foo2'
50095009

50105010
def test_from_url_db_value_error(self):
5011-
# In ValueError, should default to 0
5011+
# In case of ValueError, should default to 0, or be absent in redis-py 4.0
50125012
db = fakeredis.FakeStrictRedis.from_url(
50135013
'redis://localhost:6379/a')
5014-
assert db.connection_pool.connection_kwargs['db'] == 0
5014+
assert db.connection_pool.connection_kwargs.get('db', 0) == 0
50155015

50165016
def test_can_pass_through_extra_args(self):
50175017
db = fakeredis.FakeStrictRedis.from_url(

0 commit comments

Comments
 (0)