@@ -40,7 +40,7 @@ def test_set_int(self, cache: ValkeyCache):
40
40
if not isinstance (cache .client , ShardClient ):
41
41
raw_client = cache .client ._get_client (write = False , client = None )
42
42
else :
43
- raw_client = cache .client .get_server ( ":1:test_key" )
43
+ raw_client = cache .client ._get_client ( key = ":1:test_key" )
44
44
assert raw_client .get (":1:test_key" ) == b"1"
45
45
46
46
def test_set_float (self , cache : ValkeyCache ):
@@ -52,7 +52,7 @@ def test_set_float(self, cache: ValkeyCache):
52
52
if not isinstance (cache .client , ShardClient ):
53
53
raw_client = cache .client ._get_client (write = False , client = None )
54
54
else :
55
- raw_client = cache .client .get_server ( ":1:test_key2" )
55
+ raw_client = cache .client ._get_client ( key = ":1:test_key2" )
56
56
assert raw_client .get (":1:test_key2" ) == b"1.1"
57
57
58
58
def test_setnx (self , cache : ValkeyCache ):
@@ -766,8 +766,7 @@ def test_iter_keys_generator(self, cache: ValkeyCache):
766
766
767
767
def test_primary_replica_switching (self , cache : ValkeyCache ):
768
768
if isinstance (cache .client , ShardClient ):
769
- pytest .skip ("ShardClient doesn't support get_client" )
770
-
769
+ pytest .skip ("shard client handles connections differently" )
771
770
cache = cast (ValkeyCache , caches ["sample" ])
772
771
client = cache .client
773
772
client ._server = ["foo" , "bar" ]
@@ -842,7 +841,7 @@ def test_clear(self, cache: ValkeyCache):
842
841
843
842
def test_hset (self , cache : ValkeyCache ):
844
843
if isinstance (cache .client , ShardClient ):
845
- pytest .skip ("ShardClient doesn't support get_client " )
844
+ pytest .skip ("ShardClient doesn't support hash operations " )
846
845
cache .hset ("foo_hash1" , "foo1" , "bar1" )
847
846
cache .hset ("foo_hash1" , "foo2" , "bar2" )
848
847
assert cache .hlen ("foo_hash1" ) == 2
@@ -851,7 +850,7 @@ def test_hset(self, cache: ValkeyCache):
851
850
852
851
def test_hdel (self , cache : ValkeyCache ):
853
852
if isinstance (cache .client , ShardClient ):
854
- pytest .skip ("ShardClient doesn't support get_client " )
853
+ pytest .skip ("ShardClient doesn't support hash operations " )
855
854
cache .hset ("foo_hash2" , "foo1" , "bar1" )
856
855
cache .hset ("foo_hash2" , "foo2" , "bar2" )
857
856
assert cache .hlen ("foo_hash2" ) == 2
@@ -863,7 +862,7 @@ def test_hdel(self, cache: ValkeyCache):
863
862
864
863
def test_hlen (self , cache : ValkeyCache ):
865
864
if isinstance (cache .client , ShardClient ):
866
- pytest .skip ("ShardClient doesn't support get_client " )
865
+ pytest .skip ("ShardClient doesn't support hash operations " )
867
866
assert cache .hlen ("foo_hash3" ) == 0
868
867
cache .hset ("foo_hash3" , "foo1" , "bar1" )
869
868
assert cache .hlen ("foo_hash3" ) == 1
@@ -872,7 +871,7 @@ def test_hlen(self, cache: ValkeyCache):
872
871
873
872
def test_hkeys (self , cache : ValkeyCache ):
874
873
if isinstance (cache .client , ShardClient ):
875
- pytest .skip ("ShardClient doesn't support get_client " )
874
+ pytest .skip ("ShardClient doesn't support hash operations " )
876
875
cache .hset ("foo_hash4" , "foo1" , "bar1" )
877
876
cache .hset ("foo_hash4" , "foo2" , "bar2" )
878
877
cache .hset ("foo_hash4" , "foo3" , "bar3" )
@@ -883,7 +882,7 @@ def test_hkeys(self, cache: ValkeyCache):
883
882
884
883
def test_hexists (self , cache : ValkeyCache ):
885
884
if isinstance (cache .client , ShardClient ):
886
- pytest .skip ("ShardClient doesn't support get_client " )
885
+ pytest .skip ("ShardClient doesn't support hash operations " )
887
886
cache .hset ("foo_hash5" , "foo1" , "bar1" )
888
887
assert cache .hexists ("foo_hash5" , "foo1" )
889
888
assert not cache .hexists ("foo_hash5" , "foo" )
@@ -898,7 +897,7 @@ def test_sadd_int(self, cache: ValkeyCache):
898
897
if not isinstance (cache .client , ShardClient ):
899
898
raw_client = cache .client ._get_client (write = False , client = None )
900
899
else :
901
- raw_client = cache .client .get_server ( ":1:foo" )
900
+ raw_client = cache .client ._get_client ( key = ":1:foo" )
902
901
assert raw_client .smembers (":1:foo" ) == [b"1" ]
903
902
904
903
def test_sadd_float (self , cache : ValkeyCache ):
@@ -907,7 +906,7 @@ def test_sadd_float(self, cache: ValkeyCache):
907
906
if not isinstance (cache .client , ShardClient ):
908
907
raw_client = cache .client ._get_client (write = False , client = None )
909
908
else :
910
- raw_client = cache .client .get_server ( ":1:foo" )
909
+ raw_client = cache .client ._get_client ( key = ":1:foo" )
911
910
assert raw_client .smembers (":1:foo" ) == [b"1.2" ]
912
911
913
912
def test_scard (self , cache : ValkeyCache ):
@@ -916,15 +915,15 @@ def test_scard(self, cache: ValkeyCache):
916
915
917
916
def test_sdiff (self , cache : ValkeyCache ):
918
917
if isinstance (cache .client , ShardClient ):
919
- pytest .skip ("ShardClient doesn't support get_client " )
918
+ pytest .skip ("ShardClient doesn't support sdiff " )
920
919
921
920
cache .sadd ("foo1" , "bar1" , "bar2" )
922
921
cache .sadd ("foo2" , "bar2" , "bar3" )
923
922
assert cache .sdiff ("foo1" , "foo2" ) == {"bar1" }
924
923
925
924
def test_sdiffstore (self , cache : ValkeyCache ):
926
925
if isinstance (cache .client , ShardClient ):
927
- pytest .skip ("ShardClient doesn't support get_client " )
926
+ pytest .skip ("ShardClient doesn't support sdiffstore " )
928
927
929
928
cache .sadd ("foo1" , "bar1" , "bar2" )
930
929
cache .sadd ("foo2" , "bar2" , "bar3" )
@@ -933,7 +932,7 @@ def test_sdiffstore(self, cache: ValkeyCache):
933
932
934
933
def test_sdiffstore_with_keys_version (self , cache : ValkeyCache ):
935
934
if isinstance (cache .client , ShardClient ):
936
- pytest .skip ("ShardClient doesn't support get_client " )
935
+ pytest .skip ("ShardClient doesn't support sdiffstore " )
937
936
938
937
cache .sadd ("foo1" , "bar1" , "bar2" , version = 2 )
939
938
cache .sadd ("foo2" , "bar2" , "bar3" , version = 2 )
@@ -944,7 +943,7 @@ def test_sdiffstore_with_different_keys_versions_without_initial_set_in_version(
944
943
self , cache : ValkeyCache
945
944
):
946
945
if isinstance (cache .client , ShardClient ):
947
- pytest .skip ("ShardClient doesn't support get_client " )
946
+ pytest .skip ("ShardClient doesn't support sdiffstore " )
948
947
949
948
cache .sadd ("foo1" , "bar1" , "bar2" , version = 1 )
950
949
cache .sadd ("foo2" , "bar2" , "bar3" , version = 2 )
@@ -954,23 +953,23 @@ def test_sdiffstore_with_different_keys_versions_with_initial_set_in_version(
954
953
self , cache : ValkeyCache
955
954
):
956
955
if isinstance (cache .client , ShardClient ):
957
- pytest .skip ("ShardClient doesn't support get_client " )
956
+ pytest .skip ("ShardClient doesn't support sdiffstore " )
958
957
959
958
cache .sadd ("foo1" , "bar1" , "bar2" , version = 2 )
960
959
cache .sadd ("foo2" , "bar2" , "bar3" , version = 1 )
961
960
assert cache .sdiffstore ("foo3" , "foo1" , "foo2" , version_keys = 2 ) == 2
962
961
963
962
def test_sinter (self , cache : ValkeyCache ):
964
963
if isinstance (cache .client , ShardClient ):
965
- pytest .skip ("ShardClient doesn't support get_client " )
964
+ pytest .skip ("ShardClient doesn't support sinter " )
966
965
967
966
cache .sadd ("foo1" , "bar1" , "bar2" )
968
967
cache .sadd ("foo2" , "bar2" , "bar3" )
969
968
assert cache .sinter ("foo1" , "foo2" ) == {"bar2" }
970
969
971
970
def test_interstore (self , cache : ValkeyCache ):
972
971
if isinstance (cache .client , ShardClient ):
973
- pytest .skip ("ShardClient doesn't support get_client " )
972
+ pytest .skip ("ShardClient doesn't support sinterstore " )
974
973
975
974
cache .sadd ("foo1" , "bar1" , "bar2" )
976
975
cache .sadd ("foo2" , "bar2" , "bar3" )
@@ -1063,8 +1062,8 @@ def test_sismember_bool(self, cache: ValkeyCache):
1063
1062
assert cache .sismember ("foo" , False ) is False
1064
1063
1065
1064
def test_smove (self , cache : ValkeyCache ):
1066
- if isinstance (cache .client , ShardClient ):
1067
- pytest .skip ("ShardClient doesn't support get_client" )
1065
+ # if isinstance(cache.client, ShardClient):
1066
+ # pytest.skip("ShardClient doesn't support get_client")
1068
1067
1069
1068
cache .sadd ("foo1" , "bar1" , "bar2" )
1070
1069
cache .sadd ("foo2" , "bar2" , "bar3" )
@@ -1128,15 +1127,15 @@ def test_smismember(self, cache: ValkeyCache):
1128
1127
1129
1128
def test_sunion (self , cache : ValkeyCache ):
1130
1129
if isinstance (cache .client , ShardClient ):
1131
- pytest .skip ("ShardClient doesn't support get_client " )
1130
+ pytest .skip ("ShardClient doesn't support sunion " )
1132
1131
1133
1132
cache .sadd ("foo1" , "bar1" , "bar2" )
1134
1133
cache .sadd ("foo2" , "bar2" , "bar3" )
1135
1134
assert cache .sunion ("foo1" , "foo2" ) == {"bar1" , "bar2" , "bar3" }
1136
1135
1137
1136
def test_sunionstore (self , cache : ValkeyCache ):
1138
1137
if isinstance (cache .client , ShardClient ):
1139
- pytest .skip ("ShardClient doesn't support get_client " )
1138
+ pytest .skip ("ShardClient doesn't support sunionstore " )
1140
1139
1141
1140
cache .sadd ("foo1" , "bar1" , "bar2" )
1142
1141
cache .sadd ("foo2" , "bar2" , "bar3" )
0 commit comments