fix: mini test

This commit is contained in:
Alex committed 2026-09-14 14:12:21 +01:00
1 parent 72904b0b95
commit 1bf7380aa5
2 files changed
+49 -2

No files matched your search

+8
View File
@@ -86,6 +86,14 @@ class FakeRedis:
def expire(self, key, ttl): # TTL is not simulated.
return True
def eval(self, _script, _numkeys, key, expected):
"""Model the broker's one Lua script: delete ``key`` iff it holds ``expected``."""
with self._lock:
if self.kv.get(key) != _b(expected):
return 0
del self.kv[key]
return 1
# -- lists --------------------------------------------------------
def llen(self, key):
with self._lock: