diff options
author | Konstantin Merenkov <kmerenkov@gmail.com> | 2010-05-09 14:25:36 +0400 |
---|---|---|
committer | Konstantin Merenkov <kmerenkov@gmail.com> | 2010-05-09 14:25:36 +0400 |
commit | 09e2be4054debe073a4f351d3543d7fc48652833 (patch) | |
tree | 0ae0643064a5099134b903bdbd47155e5b40ab42 /tests/server_commands.py | |
parent | b936a60a02a5c9f1fafe301c952a8aa044ec6536 (diff) | |
download | redis-py-09e2be4054debe073a4f351d3543d7fc48652833.tar.gz |
Fixed test_hincrby
* Catch exception RedisError on attempt to increment value "a3".
Redis gives "-ERR Operation against a key holding the wrong
kind of value" on such attempts.
Diffstat (limited to 'tests/server_commands.py')
-rw-r--r-- | tests/server_commands.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/server_commands.py b/tests/server_commands.py index b827bf3..c1f4384 100644 --- a/tests/server_commands.py +++ b/tests/server_commands.py @@ -879,8 +879,7 @@ class ServerCommandsTestCase(unittest.TestCase): self.assertEquals(self.client.hincrby('a', 'a2', amount=3), 3) # finally a key that's not an int self.client.hset('a', 'a3', 'foo') - self.assertEquals(self.client.hincrby('a', 'a3'), 1) - + self.assertRaises(redis.ResponseError, self.client.hincrby, 'a', 'a3') def test_hkeys(self): |