diff options
author | Randall Leeds <randall.leeds@gmail.com> | 2011-07-07 01:40:56 -0700 |
---|---|---|
committer | Randall Leeds <randall.leeds@gmail.com> | 2011-07-07 01:40:56 -0700 |
commit | f8e73233da33356d3d16124593905b360c306e74 (patch) | |
tree | b21acd8b3c96888a0ed16e25e6384e9ce22e6aff | |
parent | fa3fac9e6e950f40dbd1e6b273dcedcc1c3cd557 (diff) | |
download | redis-py-f8e73233da33356d3d16124593905b360c306e74.tar.gz |
test that pipeline() frees a watching client
-rw-r--r-- | tests/server_commands.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/server_commands.py b/tests/server_commands.py index f3fd524..c7b58ee 100644 --- a/tests/server_commands.py +++ b/tests/server_commands.py @@ -284,6 +284,15 @@ class ServerCommandsTestCase(unittest.TestCase): self.assertRaises(redis.exceptions.WatchError, pipeline.execute) + self.client.set("b", 1) + self.client.watch("b") + self.client.set("b", 2) + pipeline = self.client.pipeline() + pipeline.set("b", 3) + + self.assertEquals(self.client.get("b"), "2") + self.assertRaises(redis.exceptions.WatchError, pipeline.execute) + def test_unwatch(self): self.assertEquals(self.client.unwatch(), True) |