File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -216,10 +216,13 @@ def test_expiration(self):
216
216
self .assertEqual (self .cache .get ("expire2" ), "newvalue" )
217
217
self .assertEqual (self .cache .has_key ("expire3" ), False )
218
218
219
- def test_set_expiration_timeout_None (self ):
220
- key , value = self .cache .make_key ('key' ), 'value'
221
- self .cache .set (key , value )
222
- self .assertTrue (self .cache ._client .ttl (key ) > 0 )
219
+ def test_set_expiration_default_timeout (self ):
220
+ self .cache .set ('a' , 'a' )
221
+ self .assertTrue (self .cache ._client .ttl (self .cache .make_key ('a' )) > 0 )
222
+
223
+ def test_set_expiration_no_timeout (self ):
224
+ self .cache .set ('a' , 'a' , timeout = None )
225
+ self .assertTrue (self .cache ._client .ttl (self .cache .make_key ('a' )) is None )
223
226
224
227
def test_set_expiration_timeout_zero (self ):
225
228
key , value = self .cache .make_key ('key' ), 'value'
You can’t perform that action at this time.
0 commit comments