diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2011-07-11 00:14:39 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2011-07-11 00:14:39 -0700 |
commit | 53c928d44acd3d1fbcb3896cadad0bde4671987a (patch) | |
tree | 52ce6641f8136fc0ae972d82f37db44ace96f2ae /tests/server_commands.py | |
parent | 24b0f17a80b51ed2d7f7e1ca139428f27bf642c9 (diff) | |
download | redis-py-53c928d44acd3d1fbcb3896cadad0bde4671987a.tar.gz |
WATCH and UNWATCH have been broken since 2.4 because of connection pooling. This fix moves WATCH and UNWATCH to the Pipeline class, where they belong and tests to prove they work.
Diffstat (limited to 'tests/server_commands.py')
-rw-r--r-- | tests/server_commands.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/server_commands.py b/tests/server_commands.py index f3fd524..b106126 100644 --- a/tests/server_commands.py +++ b/tests/server_commands.py @@ -266,27 +266,6 @@ class ServerCommandsTestCase(unittest.TestCase): self.client.zadd('a', **{'1': 1}) self.assertEquals(self.client.type('a'), 'zset') - def test_watch(self): - self.client.set("a", 1) - self.client.set("b", 2) - - self.client.watch("a", "b") - pipeline = self.client.pipeline() - pipeline.set("a", 2) - pipeline.set("b", 3) - self.assertEquals(pipeline.execute(), [True, True]) - - self.client.set("b", 1) - self.client.watch("b") - self.get_client().set("b", 2) - pipeline = self.client.pipeline() - pipeline.set("b", 3) - - self.assertRaises(redis.exceptions.WatchError, pipeline.execute) - - def test_unwatch(self): - self.assertEquals(self.client.unwatch(), True) - # LISTS def make_list(self, name, l): for i in l: |