Skip to content

Commit

Permalink
Return 0 on nonexistent hash as with real redis
Browse files Browse the repository at this point in the history
  • Loading branch information
greenape committed Apr 26, 2022
1 parent a00d4a2 commit 1058aae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flowmachine/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ def hgetall(self, key):
return self._store[key]

def hdel(self, key, name):
del self._store[key][name.encode()]
try:
del self._store[key][name.encode()]
except KeyError:
return 0

def set(self, key, value):
self._store[key] = value.encode()
Expand Down

0 comments on commit 1058aae

Please sign in to comment.