mirror of https://github.com/ledisdb/ledisdb.git
update test
This commit is contained in:
parent
a985e3ff08
commit
5ce968006c
|
@ -120,18 +120,12 @@ def ledis_ttl(ledis_client, key, k_type):
|
||||||
|
|
||||||
def test_ttl():
|
def test_ttl():
|
||||||
keys, total = scan(rds, 1000)
|
keys, total = scan(rds, 1000)
|
||||||
invalid = []
|
|
||||||
for key in keys:
|
for key in keys:
|
||||||
k_type = rds.type(key)
|
k_type = rds.type(key)
|
||||||
rds.expire(key, 100)
|
rds.expire(key, (60 * 60 * 24))
|
||||||
set_ttl(rds, lds, key, k_type)
|
set_ttl(rds, lds, key, k_type)
|
||||||
# if rds.ttl(key) != ledis_ttl(lds, key, k_type):
|
if rds.ttl(key):
|
||||||
# print key
|
assert ledis_ttl(lds, key, k_type) > 0
|
||||||
# print rds.ttl(key)
|
|
||||||
# print ledis_ttl(lds, key, k_type)
|
|
||||||
# invalid.append(key)
|
|
||||||
|
|
||||||
assert rds.ttl(key) == ledis_ttl(lds, key, k_type)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
test()
|
test()
|
||||||
|
|
Loading…
Reference in New Issue