コード例 #1
0
 def setUp(self):
     # Running Redis tests on the 5th db to avoid flushing existing
     # redis data on 0
     self.db = RedisBackend(host='localhost',
                            port=6379,
                            db=5,
                            id_generator=self.id_generator)
     super(TestRedisBackend, self).setUp()
コード例 #2
0
 def test_server_unreachable(self):
     with self.assertRaises(ConnectionError):
         RedisBackend(host='unreachable',
                      port=6379,
                      db=5,
                      id_generator=self.id_generator)