예제 #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()