projects
/
services
/
jenkins-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93297f9
)
Fixed mock implementation of hgetall
author
Ed Bartosh
<eduard.bartosh@intel.com>
Sun, 10 Aug 2014 21:40:13 +0000
(
00:40
+0300)
committer
Lin A Yang
<lin.a.yang@intel.com>
Wed, 13 Aug 2014 04:14:04 +0000
(07:14 +0300)
python-redis:hgetall returns empty dictionary if key doesn't exist.
This commit fixes this in mock. Previously it returned None in this
case.
Change-Id: I76f38d15d3918f0b7bbd41d9f3e1907f5e3b61db
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
tests/test_backenddb.py
patch
|
blob
|
history
diff --git
a/tests/test_backenddb.py
b/tests/test_backenddb.py
index
1aa9784
..
08bb73f
100644
(file)
--- a/
tests/test_backenddb.py
+++ b/
tests/test_backenddb.py
@@
-106,7
+106,7
@@
class RedisMock(object):
def hgetall(self, key):
"""Get all the fields and values in a hash."""
- return self._dict.get(key)
+ return self._dict.get(key
, {}
)
def rpush(self, key, item):
"""Add item to the list."""