diff --git a/redis/connection.py b/redis/connection.py index fe25a9e3f4..cb862da73f 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -1916,6 +1916,7 @@ def parse_ssl_verify_flags(value): "ssl_include_verify_flags": parse_ssl_verify_flags, "ssl_exclude_verify_flags": parse_ssl_verify_flags, "timeout": float, + "is_master": to_bool, } diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py index 7365c6ff13..d9e2b7aba6 100644 --- a/tests/test_connection_pool.py +++ b/tests/test_connection_pool.py @@ -405,6 +405,11 @@ def test_extra_querystring_options(self): assert pool.connection_class == redis.Connection assert pool.connection_kwargs == {"host": "localhost", "a": "1", "b": "2"} + def test_ismaster_querystring(self): + pool = redis.ConnectionPool.from_url("redis://localhost?1&ismaster=0") + assert pool.connection_class == redis.Connection + assert pool.connection_kwargs == {"host": "localhost", "db": 1,"ismaster": False} + def test_calling_from_subclass_returns_correct_instance(self): pool = redis.BlockingConnectionPool.from_url("redis://localhost") assert isinstance(pool, redis.BlockingConnectionPool)