@@ -126,11 +126,11 @@ def test_set_multi_success(self):
126
126
client = self .make_client ([b"STORED\r \n " ])
127
127
# Alias for set_many, a convienance function that calls set for every key
128
128
result = client .set_multi ({b"key" : b"value" }, noreply = False )
129
- self . assertTrue (result )
129
+ assert len (result ) == 0
130
130
131
131
spans = self .memory_exporter .get_finished_spans ()
132
132
133
- self .check_spans (spans , 2 , ["set key" , "set_multi key" ])
133
+ self .check_spans (spans , 1 , ["set_multi key" ])
134
134
135
135
def test_delete_not_found (self ):
136
136
client = self .make_client ([b"NOT_FOUND\r \n " ])
@@ -191,19 +191,17 @@ def test_delete_many_found(self):
191
191
192
192
spans = self .memory_exporter .get_finished_spans ()
193
193
194
- self .check_spans (
195
- spans , 3 , ["add key" , "delete key" , "delete_many key" ]
196
- )
194
+ self .check_spans (spans , 2 , ["add key" , "delete_many key" ])
197
195
198
196
def test_set_many_success (self ):
199
197
client = self .make_client ([b"STORED\r \n " ])
200
198
# a convienance function that calls set for every key
201
199
result = client .set_many ({b"key" : b"value" }, noreply = False )
202
- self . assertTrue (result )
200
+ assert len (result ) == 0
203
201
204
202
spans = self .memory_exporter .get_finished_spans ()
205
203
206
- self .check_spans (spans , 2 , ["set key" , "set_many key" ])
204
+ self .check_spans (spans , 1 , ["set_many key" ])
207
205
208
206
def test_set_get (self ):
209
207
client = self .make_client (
@@ -243,7 +241,7 @@ def test_prepend_stored(self):
243
241
244
242
def test_cas_stored (self ):
245
243
client = self .make_client ([b"STORED\r \n " ])
246
- result = client .cas (b"key" , b"value" , b"cas" , noreply = False )
244
+ result = client .cas (b"key" , b"value" , 1 , noreply = False )
247
245
self .assertTrue (result )
248
246
249
247
spans = self .memory_exporter .get_finished_spans ()
@@ -252,7 +250,7 @@ def test_cas_stored(self):
252
250
253
251
def test_cas_exists (self ):
254
252
client = self .make_client ([b"EXISTS\r \n " ])
255
- result = client .cas (b"key" , b"value" , b"cas" , noreply = False )
253
+ result = client .cas (b"key" , b"value" , 1 , noreply = False )
256
254
assert result is False
257
255
258
256
spans = self .memory_exporter .get_finished_spans ()
@@ -261,7 +259,7 @@ def test_cas_exists(self):
261
259
262
260
def test_cas_not_found (self ):
263
261
client = self .make_client ([b"NOT_FOUND\r \n " ])
264
- result = client .cas (b"key" , b"value" , b"cas" , noreply = False )
262
+ result = client .cas (b"key" , b"value" , 1 , noreply = False )
265
263
assert result is None
266
264
267
265
spans = self .memory_exporter .get_finished_spans ()
@@ -445,7 +443,7 @@ def test_version_success(self):
445
443
def test_stats (self ):
446
444
client = self .make_client ([b"STAT fake_stats 1\r \n " , b"END\r \n " ])
447
445
result = client .stats ()
448
- assert client .sock .send_bufs == [b"stats \r \n " ]
446
+ assert client .sock .send_bufs == [b"stats\r \n " ]
449
447
assert result == {b"fake_stats" : 1 }
450
448
451
449
spans = self .memory_exporter .get_finished_spans ()
0 commit comments