def testKVSClient(self): try: from kvs.redis_client import get_client except ImportError: return client = get_client(name='glot', setting={'glot': {'HOST': 'localhost'}}) self._assertInit(client) self.tearDown() self._assertGet(client)
def testKVSClient(self): try: from kvs.redis_client import get_client except ImportError: return client = get_client(name='glot', setting={'glot': { 'HOST': 'localhost' }}) self._assertInit(client) self.tearDown() self._assertGet(client)
def _redis_kwargs(self, client, kwargs): if client is not None: kwargs['client'] = client return kwargs if self._use_kvs_module_connection == True: from kvs.redis_client import get_client kwargs['client'] = get_client(name=self._db, setting=self._redis) return kwargs kwargs['host'] = self.redis_host kwargs['port'] = self.redis_port kwargs['db'] = self.redis_db return kwargs