summaryrefslogtreecommitdiff
path: root/tests/server_commands.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2011-06-10 10:56:48 +0200
committerAndy McCurdy <andy@andymccurdy.com>2011-06-10 10:56:48 +0200
commit97f0d20db8175990be67fc1ed86375079f92a2af (patch)
tree65e73932f1a25caa81e29a693272a33919cc4597 /tests/server_commands.py
parent4103be272bd886498ec850ea7d5ce5c3b4979014 (diff)
downloadredis-py-97f0d20db8175990be67fc1ed86375079f92a2af.tar.gz
fix for PythonParser when reading empty strings
Diffstat (limited to 'tests/server_commands.py')
-rw-r--r--tests/server_commands.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/server_commands.py b/tests/server_commands.py
index 9d82eac..f3fd524 100644
--- a/tests/server_commands.py
+++ b/tests/server_commands.py
@@ -1009,6 +1009,11 @@ class ServerCommandsTestCase(unittest.TestCase):
self.assertEqual(self.client.hgetall('foo'), d)
self.assertRaises(redis.DataError, self.client.hmset, 'foo', {})
+ def test_hmset_empty_value(self):
+ d = {'a': '1', 'b': '2', 'c': ''}
+ self.assert_(self.client.hmset('foo', d))
+ self.assertEqual(self.client.hgetall('foo'), d)
+
def test_hmget(self):
d = {'a': 1, 'b': 2, 'c': 3}
self.assert_(self.client.hmset('foo', d))