def test_multi_on_implicit_transaction(self): """ Cannot start an explicit transaction when commands have already been issued. """ with self.redis.pipeline() as pipeline: pipeline.set("foo", "bar") with assert_raises_redis_error(): pipeline.multi()
def test_multiple_multi_calls(self): """ Cannot call multi mutliple times. """ with self.redis.pipeline() as pipeline: pipeline.multi() with assert_raises_redis_error(): pipeline.multi()
def test_watch_after_multi(self): """ Cannot watch after multi. """ with self.redis.pipeline() as pipeline: pipeline.multi() with assert_raises_redis_error(): pipeline.watch()