@@ -142,7 +142,6 @@ async def get_mocked_redis_client(
142
142
with mock .patch .object (ClusterNode , "execute_command" ) as execute_command_mock :
143
143
144
144
async def execute_command (* _args , ** _kwargs ):
145
-
146
145
if _args [0 ] == "CLUSTER SLOTS" :
147
146
if cluster_slots_raise_error :
148
147
raise ResponseError ()
@@ -1574,23 +1573,23 @@ async def test_cluster_bitop_not_empty_string(self, r: RedisCluster) -> None:
1574
1573
1575
1574
@skip_if_server_version_lt ("2.6.0" )
1576
1575
async def test_cluster_bitop_not (self , r : RedisCluster ) -> None :
1577
- test_str = b"\xAA \x00 \xFF \x55 "
1576
+ test_str = b"\xaa \x00 \xff \x55 "
1578
1577
correct = ~ 0xAA00FF55 & 0xFFFFFFFF
1579
1578
await r .set ("{foo}a" , test_str )
1580
1579
await r .bitop ("not" , "{foo}r" , "{foo}a" )
1581
1580
assert int (binascii .hexlify (await r .get ("{foo}r" )), 16 ) == correct
1582
1581
1583
1582
@skip_if_server_version_lt ("2.6.0" )
1584
1583
async def test_cluster_bitop_not_in_place (self , r : RedisCluster ) -> None :
1585
- test_str = b"\xAA \x00 \xFF \x55 "
1584
+ test_str = b"\xaa \x00 \xff \x55 "
1586
1585
correct = ~ 0xAA00FF55 & 0xFFFFFFFF
1587
1586
await r .set ("{foo}a" , test_str )
1588
1587
await r .bitop ("not" , "{foo}a" , "{foo}a" )
1589
1588
assert int (binascii .hexlify (await r .get ("{foo}a" )), 16 ) == correct
1590
1589
1591
1590
@skip_if_server_version_lt ("2.6.0" )
1592
1591
async def test_cluster_bitop_single_string (self , r : RedisCluster ) -> None :
1593
- test_str = b"\x01 \x02 \xFF "
1592
+ test_str = b"\x01 \x02 \xff "
1594
1593
await r .set ("{foo}a" , test_str )
1595
1594
await r .bitop ("and" , "{foo}res1" , "{foo}a" )
1596
1595
await r .bitop ("or" , "{foo}res2" , "{foo}a" )
@@ -1601,8 +1600,8 @@ async def test_cluster_bitop_single_string(self, r: RedisCluster) -> None:
1601
1600
1602
1601
@skip_if_server_version_lt ("2.6.0" )
1603
1602
async def test_cluster_bitop_string_operands (self , r : RedisCluster ) -> None :
1604
- await r .set ("{foo}a" , b"\x01 \x02 \xFF \xFF " )
1605
- await r .set ("{foo}b" , b"\x01 \x02 \xFF " )
1603
+ await r .set ("{foo}a" , b"\x01 \x02 \xff \xff " )
1604
+ await r .set ("{foo}b" , b"\x01 \x02 \xff " )
1606
1605
await r .bitop ("and" , "{foo}res1" , "{foo}a" , "{foo}b" )
1607
1606
await r .bitop ("or" , "{foo}res2" , "{foo}a" , "{foo}b" )
1608
1607
await r .bitop ("xor" , "{foo}res3" , "{foo}a" , "{foo}b" )
0 commit comments