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