示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 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()
示例#4
0
 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()
示例#5
0
 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()
示例#6
0
 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()