@@ -152,7 +152,6 @@ async def get_mocked_redis_client(
152152 with mock .patch .object (ClusterNode , "execute_command" ) as execute_command_mock :
153153
154154 async def execute_command (* _args , ** _kwargs ):
155-
156155 if _args [0 ] == "CLUSTER SLOTS" :
157156 if cluster_slots_raise_error :
158157 raise ResponseError ()
@@ -197,7 +196,8 @@ def __del__(self):
197196 @property
198197 def connection_pool (self ):
199198 # Required abstract property implementation
200- return self .nodes_manager .get_default_node ().redis_connection .connection_pool
199+ default_node = self .nodes_manager .get_default_node ()
200+ return default_node .redis_connection .connection_pool
201201
202202 return await MockedRedisCluster (* args , ** kwargs )
203203
@@ -1643,23 +1643,23 @@ async def test_cluster_bitop_not_empty_string(self, r: RedisCluster) -> None:
16431643
16441644 @skip_if_server_version_lt ("2.6.0" )
16451645 async def test_cluster_bitop_not (self , r : RedisCluster ) -> None :
1646- test_str = b"\xAA \x00 \xFF \x55 "
1646+ test_str = b"\xaa \x00 \xff \x55 "
16471647 correct = ~ 0xAA00FF55 & 0xFFFFFFFF
16481648 await r .set ("{foo}a" , test_str )
16491649 await r .bitop ("not" , "{foo}r" , "{foo}a" )
16501650 assert int (binascii .hexlify (await r .get ("{foo}r" )), 16 ) == correct
16511651
16521652 @skip_if_server_version_lt ("2.6.0" )
16531653 async def test_cluster_bitop_not_in_place (self , r : RedisCluster ) -> None :
1654- test_str = b"\xAA \x00 \xFF \x55 "
1654+ test_str = b"\xaa \x00 \xff \x55 "
16551655 correct = ~ 0xAA00FF55 & 0xFFFFFFFF
16561656 await r .set ("{foo}a" , test_str )
16571657 await r .bitop ("not" , "{foo}a" , "{foo}a" )
16581658 assert int (binascii .hexlify (await r .get ("{foo}a" )), 16 ) == correct
16591659
16601660 @skip_if_server_version_lt ("2.6.0" )
16611661 async def test_cluster_bitop_single_string (self , r : RedisCluster ) -> None :
1662- test_str = b"\x01 \x02 \xFF "
1662+ test_str = b"\x01 \x02 \xff "
16631663 await r .set ("{foo}a" , test_str )
16641664 await r .bitop ("and" , "{foo}res1" , "{foo}a" )
16651665 await r .bitop ("or" , "{foo}res2" , "{foo}a" )
@@ -1670,8 +1670,8 @@ async def test_cluster_bitop_single_string(self, r: RedisCluster) -> None:
16701670
16711671 @skip_if_server_version_lt ("2.6.0" )
16721672 async def test_cluster_bitop_string_operands (self , r : RedisCluster ) -> None :
1673- await r .set ("{foo}a" , b"\x01 \x02 \xFF \xFF " )
1674- await r .set ("{foo}b" , b"\x01 \x02 \xFF " )
1673+ await r .set ("{foo}a" , b"\x01 \x02 \xff \xff " )
1674+ await r .set ("{foo}b" , b"\x01 \x02 \xff " )
16751675 await r .bitop ("and" , "{foo}res1" , "{foo}a" , "{foo}b" )
16761676 await r .bitop ("or" , "{foo}res2" , "{foo}a" , "{foo}b" )
16771677 await r .bitop ("xor" , "{foo}res3" , "{foo}a" , "{foo}b" )
0 commit comments