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()
def test_server_unreachable(self): with self.assertRaises(ConnectionError): RedisBackend(host='unreachable', port=6379, db=5, id_generator=self.id_generator)